Adding data to a template
Templates get interesting when you add your own data. The keys to using your own data successfully are:
- Understanding the template's data structure so you can match it
- Using the column settings panel to join your data with the template
Understanding the data structure
The first step is to look at the sample data in the template, as we’ll need to get our data into the same format.
All templates expect data in a certain format. While the exact format varies by template, you can always look at the column settings panel ("Select columns to visualise", on the right, to see which columns are required and which are optional. In Flourish, the names and order columns don't matter – instead, you use the column settings panel to specify, by letter, which column is which.
In this example, we can see, from taking a look at the column settings panel, that the template is currently using the “Values” sheet to specify each arrow, and it requires the following columns:
- "Source location" (country) for the arrow (currently set to column C)
- "Destination location" (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 column A and column B.
Switching tabs, we can see how the “Locations” sheet specifies the locations of the arrows using a location code, as well as a 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.
Uploading data and selecting columns
Once our data is in the right format, we can navigate to the data sheet we want to replace and click “Import your data”. Then we can update the column settings panel to point to the correct columns. And that’s it! Now, when we go to the preview, we should see that our globe has updated.
Frequently asked questions
What if the format of my data doesn’t match the format required by the template?
Often your data will be suitable for the template but your spreadsheet or CSV file will be in a slightly different format than what's required. For example, to show a time slider in the “Connections globe” or ”Scatter” templates, your data should be in a “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. To convert your data from one format to another, you can use a a spreadsheet tool, like Excel, before importing it into Flourish. If you just want to change your data from wide to long, you can also use Flourish's nifty unpivoting feature. (Read more about that here.)
Other times, your data will contain the information that you want to visualize but it will be in a more fundamentally different format. For example, you might want to use the Marker map template, which uses latitudes and longitudes to draw points, but your dataset might contain postcodes instead. In this situation you could convert your data using a free online service, like this site, which will convert postcodes to latitudes and longitudes.
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.