How to merge datasets in Flourish

Merging data is useful when you have two datasets with shared variables – for example, a dataset containing country names and GDP, and another containing country names and life expectancy. Flourish allows you to take both datasets and merge them together based on their shared column. In our example below, the shared column is the country name.

Merging data is possible across all Flourish templates and this help doc will walk you through how. Note that before merging data into a template, you should make sure that you understand the data structure and that it matches that of the template.

To merge datasets in Flourish,

Start by uploading your first dataset to Flourish via the Upload data button. If you're looking to merge data into one of our Projection map or 3D region map starting points, you can skip this step.

Now that we have one of our datasets imported, it's time to  merge in our second dataset. To do this, click on the arrow next to the Upload data button and select Upload data and merge. Then, select your second dataset. You will be prompted to  select a matching column to join on. Make sure you choose one that is (mostly) the same across both datasets. Once you've selected the matching columns, select Merge now and your data should be added next to the existing data.

TIP: If your datasets have two- or three-letter country codes, it is recommended to use these to join on, as they are more reliable than country names, which might be spelled differently across different datasets.

The merge functionality uses a  left join, which means that non-matching rows will be dropped from the imported data. If some rows don't match on import, you will be informed how many didn't match, and you'll be able to spot them in the data as there will be blank rows. In our example below, we're merging data to our Projection map starting point of London and learn that 2 rows aren't matching upon trying to import.

To add in the missing data, you can either copy it across from the Excel sheet – this is recommended if there are less than five missing values – or make sure the names match in the sheets and try merging in again.

You can repeat the merge process for multiple datasets if you have more than two.