How to make a bump chart in Tableau (with a side of politics)
Recently the Netherlands held their general elections. This was a tense time of year for me, having watched the UK vote to leave the EU and seeing Trump become president. Maybe I’m a bit of a hippie or an idealist, but I am not very much a fan of the current popular xenophobic opinions. Sure, the world is going through some uncertain times, but wouldn’t it be better if we just worked together?
I thought I’d have a look to see how the political climate has changed in The Netherlands over time. The results I found still a little alarming, the, what some may call the “racist” PVV party, has gone up in rankings, but luckily, has not reached the top!
Enough of that, it’s time to viz. So what I wanted to do with my viz, was see how each of the political parties ranked over the years. I got my data from the almighty Wikipedia. They have a page for each election year, showing how many seats each party has won. I copied and pasted these into an excel file. Simples!
Now to make the bump chart:
- Bring the measure (or dimensions) you want to splits your ranks by (in my case the year) to columns as a discrete field.
- Bring the field containing the members you want to rank to colours. In my case this is the ‘Party’.
- To apply the ranking, you will need to create a calculated field for the measure you want to rank. To do this I’ve used the Rank Unique function.
- Bring this new rank field to the rows shelf. This will look a little messy to start with.
- You now need to change the ‘Compute Using’ to your dimension of choice, which for me is ‘Party’. In case you aren’t sure how to do this, click on the triangle on the right-hand side of your rank pill and select, compute using, then your field.
- Almost there! To create the “bumps” you will need to make this a dual axis chart and change one of your marks to a circle. Done!
- Format etc. to your liking!
See the final viz here!