Templates get interesting when you add your own data. The key to using your own data successfully is:
- understand the data structure that your template expects, and match it
- use the column selection panel to join your data to the template.
The first step is to look at the data in the existing template, as we’ll need data in a similar format.
From the column selection panel on the right, we can see that the template is currently using the “Values” sheet to specify each arrow, and it requires the following columns:
- Source country for the arrow (currently set to column C)
- Destination country for the arrow (column D)
- Value (thickness) of the arrow (column E)
There are also two optional columns for the data filters, currently set to A and B.
All templates expect data in a defined format – the exact format varies by template. You can look at the column selection panel to see which columns are required and which are optional.
In Flourish, the name and ordering of the columns doesn’t matter – you use the column selection panel to specify which column is which.
Switching tabs, we see how the “Locations” tab specifies the locations of the arrows, with a location code, name, latitude and longitude for each country. These location codes match the codes in columns C and D in the “Values” sheet:
To make our own version of the globe, we’ll need to replace the sample “Values” sheet with new data that has columns for the source, destination and value of each arrow. And we’ll need to make sure each source and destination has a matching entry in the “Locations” sheet.
Once your data is in the right format, open the sample data sheet you want to replace and click “Import your data” to overwrite it with your data. Then update the column selection panel to point to the correct columns in your data. And that’s it! If you go to the preview, you’ll see that your globe has updated.
Alternatively, if you want to leave the sample data to refer back to later, you can first create a new data tab and “Import” into that:
When your data has been uploaded, point the “Values” section at your new sheet, and update the column selection panel to specify which column is which.
What if the format of my data doesn’t match the format required by the template?
Sometimes, your data will be suitable for the template but your sheet won’t be in quite the right format. For example, to show a time slider in the “Connections globe” or ”Scatter” templates, your data should be in “long” format, with years or dates in a single column. But it’s not unusual to have “wide” data, where dates are spread across multiple columns. You could reshape your data from wide to long (or vice versa) using a spreadsheet tool, such as Excel, before importing it into Flourish.
Sometimes, your data will contain the information that you want to visualise but in a more fundamentally different format. For example, you might have a dataset that contains postcodes, but want to display it in the “Icon map” template, which expects latitude and longitude. You could convert your data using a free online service. For example, this site will add lat-long columns to postcode data.
Can I use live data?
Easy-to-use live data features are coming! In the meantime, it’s possible to make custom templates that point to live data sources.