Getting started with data in Toucan¶
This page is dedicated to show an overview of the data journey in a Toucan small app. Where to start to build the “data” part of your “data vizualisation”.
Be aware that is the tricky part of the job ! Invisible and indispensable.
Overview of the data journey¶
Here is a Toucan graph :
You can see the data associated here :
Here data is called dataset
Let’s drill down to the very beginning of this data and understand the whole journey. Before obtaining the graph the data have been stored into a mongo database from where it has been queried and a little postprocessed :
Here data is called domain
All available domain are displayed in the data-explorer panel :
Before being stored into mongo database, the data can come from :
- Your computer
- An external database
You can see this from the data-sources panel :
Here data is called file or datatsource
To sum up :
The design first approach¶
First you design your data story. With Toucan Studio it’s so funny and easy. You must use fake data in order to iterate quickly with it. Once your design is validated you obtain your data model. Write down the list of tables with column names types. Take into account :
- Graph expectancies
- Connections between tables
- Requesters and filters
- Types of data : number (‘int’ or ‘float’) or list of character (‘string’ or ‘str’)
About data model :
- The sooner, the better.
- Once set, you cannot change design anymore !
- You cannot iterate too much on it.
Your mission : drive data from here :
To here :
Let’s overview the data journey with a little exercice : try to make a vizualisation with this list of datasets :)
Library of files : https://github.com/rhuille/files/tree/master/datasets
👉 Always validate your datasources each time.
- (★☆☆☆☆) Horizontalbarchart to visualize the total column by age group of age.xsl file
- (★★☆☆☆) Horizontalbarchart to visualize the “CA” column by country
(be careful with
decimaloptions) of data_countries.csv file
- (★★★☆☆) Horizontalbarchart with the percentage of Women (use a
formulapostprocess) of age.xsl file
- (★★★★☆) Horizontalbarchart to visualize the sum of “CA” column by
region (use a
groupbyin postprocess) of data_countries.csv file
- (★★★★☆) Horizontalbarchart to vizualise “Women” or “Men” column
depending on a bouton (create a filter using a
- (★★★★★) A Bubblechart with a button to change the column for the xLabel and yLabel : (use two requesters!) of Iris.xls file
The goal of this last exercice is :