How To: Using Ranks to Create Bump Charts in Tableau
I saw a really cool analysis done by Datagraver on the popularity of car colors over time. I built this viz as a way to reimagine what they had done.
Check out the interactive version
This viz exploded in popularity after posting it on reddit/r/dataisbeautiful to the tune of 300k+ views. I certainly didn't expect this for such a simple viz, but I am glad that it resonated with so many.
One thing I noticed in the comments on Reddit is that people were curious about how to do this in Tableau. It is pretty simple to build bump charts in Tableau, so let's look at what it takes to build them.
Step 1: Create a calculated field for the measure we want to rank. In this case, I am using rank_unique so that the same rank isn't assigned.
Step 2: Bring the dimension you are ranking by to the color shelf and pull the Year or time period to the columns shelf.
Step 3: Bring the newly created Rank measure to the rows shelf. Change the Compute Using to whatever your dimension is on the color shelf. This will give you a basic bump chart.
Step 4: To get the ranks on the bump chart itself, I use dual axis. Drag another copy of your rank to the rows, select the same compute using, and then select dual axis. Make sure to synchronize your axes.
Step 5: Change the marks on the secondary axis to circles.
Step 6: To display the ranks on the circles, we need a calculated field to convert them to a string. We create this and then add it to the labels. Make sure to compute by the dimension specified for the rank.
Step 7: Reverse the axis.
That's it! You now have a bump chart built using ranks that displays the ranks on the chart itself.
Feel free to download the workbook and comment with any questions.
Awesome. super easy and straight forward.
ReplyDeleteThis is awesome. I try to download the workbook but since my version is 9.1, it can't open it on my machine. I can get the graph, but I noticed once we hover over any circle, it will highlight all the circles for that color category, I can't do this. Could you please tell me how to get this? Or is that just because 9.1 can't do that? Thanks so much
ReplyDeleteJust wish to say your article is as surprising.
ReplyDeleteThe clarity to your post is simply great and that i could
suppose you’re a professional on this subject.
Well with your permission let me to clutch your feed to stay up to date with approaching post.
Thank you a million and please continue the rewarding
work.
Tableau Guru
www.sqiar.com
How to change color border on hover action in Tableau Public?
ReplyDeleteThanks
Matjaz
You will need to create a dashboard action for a highlight on hover.
Deletehttps://onlinehelp.tableau.com/current/pro/online/mac/en-us/actions_highlight_advanced.html