Week 48 of the acclaimed weekly social data project focused on the share of US household wealth by income level. The headline was that the top 0.1% of households now hold about the same amount of wealth as the bottom 90%. It is a mind boggling fact.
The original accompanying chart is here:
To be honest, I quite like it. I don’t see the need for duplicated y-axis labelling, and it’s generally a bit cluttered with text, but it conveys the trends of the two Measures well enough for me. If anything, it lacks a bit of context – how many people are in the Bottom 90% and Top 0.1% categories? What is their total wealth? I think the most powerful comparative would be average wealth per capita, but I always prefer to stick with the source data.
Whenever I get some #MakeoverMonday data, I have a quick poke about to see what sort of Dimensions and Measures I have to play with.
That’s quite a few Measures to take in! The original viz focused on two of them, but it’s always interesting to look at all of the source data to see what you might find.
Everything at once is a bit hectic. You can identify general trends, but it’s hard to understand why some categories are on an upward trajectory whilst others are heading in the opposite direction.
I started to manually drag a couple of Measures in and out of views:
It was a useful exercise, as it immediately became clear that comparing two Measures is far simpler than comparing the whole set of Measures. If only I could automate the process, instead of manually dragging stuff in and out of the scope of the view. Oh – it’s Tableau – of course I can do that!
To achieve the end product, I just needed to create a Parameter, an associated calculated field, and then duplicate them both.
So a basic String Parameter, which contains all of the Measures. In order for the Parameter to “do” anything, I need to write a calculation to act upon the selection made in the Parameter:
Both the Parameter and calc were duplicated, with the duplicated Parameter just renamed “Select Measure Two”. The duplicated calc was renamed, and all references to [Select Measure One] were obviously amended to refer to [Select Measure Two]. The structure of the viz was a simple affair:
It’s just the two calculated fields on a shared axis. To create a legend, I just added a Title, which became dynamic by referring to the selected Measures in the two Parameters. These were then colour coded accordingly:
And that’s it. A tiny bit of dashboard arranging ensued, and resulted in what is now my default “look” – which is essentially a very streamlined and basic style, comprising of a single chart, a Title of sorts, and footnotes relating to data source and the project / author.