This week’s #makeovermonday was really fun and one of those where I learned the most. But first a big thank you to Michael Mixon and Jeffrey Shaffer for their help. We are so lucky to have such an awesome community where we can just ask a question and someone is their willing to give you their time and help you.
Let’s start with the original from CNN, see original below and click for article:
I don’t think this works because the way the original was split into quartiles you are left wondering which state is first. In this ranking analysis knowing which one is first is important. 1st and 13th are quite a way apart and the viewer needs to be able to distinguish that. The only apparent thing is that South states fare worse than North states but you can’t infer much else.
Inspired by Michael’s MakeoverMonday on Human Trafficking I thought a circle would work well here. Maybe a bar would be the simplest way of displaying this data but I wanted to learn how to create this. So after a bit of googling I found this great site that generates the angle, X and Y points for you. Once you have this add an extra column with an ID per row.
But while I had a circle I couldn’t quite get it to do what I wanted. My end goal was to have the states move position as the viewer changed the indicator.
I tried blending but wasn’t working properly so I spoke to Michael and Jeffrey to see if they could help and in true Tableau fashion they came up to the end result using different approaches.
You’ll need the original data and the newly created data set from that website which gave us X, Y and Angle. Before you blend create a Parameter to select between each indicator and create a calculated field like the one below.
Make that new calculated field a dimension and create a custom relationship where your calculated field blends with the ID. Bear in mind this works because the measures are all ranks and they go from 1-50 like our ID’s.
Once that’s done just bring X to Columns and Y to Rows, I have changed the X to a negative so that my ranking goes clockwise.
Bring state to detail and change the marks to a filled map and there you have it. A circle that changes when you select a different indicator.
Michael’s approach was slightly different in that it didn’t make use of that website to generate the angles, X and Y’s.
Here’s Michael’s workings:
Start by creating a calculated field like the one before, but this time as an aggregate and leave it as a measure.
Followed by this calculation to create the angles where 50=the number of states to be plotted.
Calculate the X
The next steps are similar to the ones before where you bring X to Columns Y to Rows and our calculated field allowing us to select from a parameter goes into color.
Bring State into detail, change the mark to a filled map and there you go your circle is ready.
I’ve published both methods to Tableau Public where you can download them and do it yourself.
I then spent time on design and colors and this is my end result, click for interactive version.
Quite simple but I really like it and most important of all I’ve learned a few new things.
Let me know what you think in the comments below, and don’t forget to check all other entries on twitter.
Thank you for reading