Select Page

When you are in the world of data it would be very difficult have not heard about Hans Rosling. He was a Swedish physician, academic, and public speaker. And he was one of the biggest promoters of using data and data visualisation to promote to explore development issues. Most in the data school (including myself) only came to know him from a 4-minute BBC 4 talk in which – with the help of very advanced cameras and visual effects from the BBC – he presented the development of 200-countries across the span of 200-years. You can find it here:

Its something that I can keep watching over and over again. He has a natural charisma when he’s presenting, and he simplifies everything so that even with people with no technical backgrounds can understand it without losing any of its meaning. Among many things in the video the one aspect that stood out was how the visualisation was done. And today, I will be showing you how it can be done using Tableau.

# Data

The first step is getting the data. Due to this being a Workout Wednesday challenge, you can find the data here or you can grab it from Gapminder, a non-profit venture founded by Hans Rosling to promote the use of statistics and other information about social, and economic issues on a global scale.

There should be four datasets: population, list of countries, life expectancy, and income per person, like so:

As you can see you will need to create a relationship between the income dataset and the other three datasets like so:

So, when making the relationship from income to life expectancy and to population, you also need to do it for the country and the year as well. However, for countries, you only need countries.

# Visualisaiton

Now that you have the data and its been connected, we can look at making the visualisation. The visualisation consists of three parts, the region selector, the scatterplot, and the year.

Let’s make the region selector first. Make a calculated field like so:

Then drag the new field on to the columns shelf, and drag it onto the colour mark and the text mark. As a result, you should get this:

Now, for the scatterplot, drag the “income” and “life expectancy” to the column shelf and the row shelf, respectively (NOTE: the “income” axis set to logarithmic and fixed from 200 to 200000). Then drag the “region_selector” field on to the colour mark card and the filter pane as well (this is to remove the null), the “country” on to the detail mark card, and the “population” on to the size mark card. Furthermore, in order for the visual to be animated drag the “year” on the “Pages” pane. You also need to create the watermark which will show the year changing. Make a calculated field like so:

And drag this onto the “Filter” pane as well and select “True”. It should now look like this:

Now, finally we need another sheet to show the year changing behind the scatterplot. For this, drag “years” on the “Pages” shelf, and also the “Text” mark card. Furthermore, add the “watermark_year” field to the filters pane and set to “True”. And the end result should something similar to this:

Now, its just a matter of putting it together. Drag the “region_selector” sheet to the top. Then drag the “Scatterplot” sheet at the bottom, and make the background colour of the sheet to be “None” and have it be floating. Then, drag the “years” sheet and arrange it so that the “Scatterplot” is in front of the “years” sheet. The “region_selector” is a highlight dashboard action like so:

There you have it, recreated Hans Roslings talk from the comfort of your home/office. You can check out the completed dashboard here.