How To Make An Animated Data Visualisation On Tableau

Kork Ling Hui
4 min readOct 11, 2020

--

Recently I followed a tutorial on how to create animated data visualisations on tableau! Unfortunately, the instructions were not clear enough for me (or I’m just a tableau noob) but it took me around 2 hours to produce this snazzy animation of life expectancy vs GDP per capita from 1800 to 2019.

https://vimeo.com/467065434

So I’ll be sharing my own tutorial on this! It’s super easy to follow along and I have included some mistakes to avoid at the end so you won’t take 2 hours but maybe 20 minutes at most.

Here are the STEPS:

  1. download the 4 data files for life expectancy, GDP per capita, countries and population here: https://www.gapminder.org/data/
  2. for all 3 data sets except countries_total, put field names in first row

3. make them into pivot tables:

  • select ALL columns except the first one
  • click on the mini arrow in the second column

4. RENAME YOUR VARIABLES ((it sounds like a chore but do it!!! or else you will spend a long time finding out why your data can’t blend together in tableau like me…))

5. it should look like this for all the datasets:

((there is no need to do anything to the countires_total data set as everything inside has been formatted nicely, but you need to rename ‘name’ to ‘country’))

6. Go to sheet 1, and click on ‘Data’ → ‘Edit blend relationships’ → ‘OK’

7. Drop the ‘Life Expectancy’ into rows and ‘GDP per Capita’ into columns

8. Take ‘Population’ and drop it into ‘Size’ under the ‘Marks’ section, take ‘region’ and drop it into ‘Color’, and drop ‘Country’ into ‘Details’:

9. Fix our ridiculously large axis:

  • For life expectancy: set to 20–90. Click on the axis and select ‘Edit axis’
  • For GDP per capita: set to 200–60,000. Make sure it is in logarithmic scale.

10. Drop ‘year’ into ‘pages’

  • A window will pop up, select ‘add all members’

11. A few things here:

  • Change the visualisation to ‘circle’
  • Adjust the size of the circles by clicking on ‘size’
  • Drop ‘country’ into ‘labels’

12. ta-daaaa we are done!!! ((you can also change the visualisation to ‘lines’ to see how the line chart changes over time))

MISTAKES I MADE SO YOU DON’T HAVE TO

  1. I didn’t ‘link’ the datasets… (which made me spend a lot of time troubleshooting but the answer was right infront of me)

2. Didn’t rename my sheets properly so the ‘edit blend relationship didn’t work for me since I didn’t think ‘name’ was the same as ‘country’ for the countries_total data set

((if you rename it to countries))

3. I filtered to hide all the null values!

Thank you for reading up till here and I hope you found this helpful and that this aids in your data visualisation journey! Big thanks to Dr Charles as usual for always introducing new, innovative ways to present data! See you in my next post!

--

--

Kork Ling Hui
Kork Ling Hui

Written by Kork Ling Hui

All about Quantitative Reasoning and Data Visualisations!

No responses yet