A confession. My intention was to tackle Nils Macher‘s fancy looking jump plot. It looks as cool as can be and I was temporarily seduced by Nils’ sensational curves:
Then I crashed down to earth, remembering that to create pretty things like this, you need to lob in bezier curves and some fiddly maths. I steer away from taking this stuff apart because:
- I don’t get it
- Point 1 is good enough
Worry not though! If you’re as taken by Nil’s work as I was, then this link takes you to a series of posts detailing the fiddly maths behind bendy lines.
Back to this week’s #TakeapartTuesday; Rodrigo’s work was inspired by a 2015 YouTube video created by Tableau newbie, Mr. Andrew Kriebel:
It looks like this Andy guy has a future with Tableau, so I’ll make use of his video to recreate Rodders’ viz if I get stuck.
Let’s get started. One thing I don’t like about Rodrigo’s viz is the mix of case types used in the text. For me it should all be UPPERCASE, or it should all be lowercase. For my recreation I’m going to go down the UPPERCASE route, which just means naming the various calculations accordingly.
Rodrigo is focusing on the last decade of data. There are more dynamic methods than the one I took to limit the data to this period of time – a range specific data source filter:
With hindsight, I should have used a Relative dates filter to achieve dynamism – especially as the calculations I created supported dynamic data (apart from their names – wouldn’t dynamic calculation names be a great thing for a future release?)
To check the data now that this data source filter is in place, I created the following view:
What this showed is that there are over 30 countries with data for each of the 19 data points in the remaining data. I made a choice to only show those countries with “all” the data, so created this boolean calculation to filter the data:
Sticking that on Filters and setting it to True means I only now capture the countries with a complete set of data. Let’s now start to figure out the calcs needed to build out the tabular section of Rodrigo’s viz. First of all, let’s find a way to pull through the dollar value for the first date in my now reduced dataset – June 2008.
I like to use Level Of Detail calcs in circumstances like these, so created basic minimum and maximum date calculations:
You can probably figure out the [Max Date] version (!) With this set up, I then set about incorporating this in my [JUNE 2008] calculation:
The [JULY 2008] equivalent just substitutes the [Min Date] calc for the [Max Date]. These two calcs allow me to create a [Change] calc, so I can show the value difference between the two dates:
And using that last calc, I can work out the percentage change between the two dates as well:
Some of these calcs represent a deviation from Rodrigo’s viz, but my preference was to show the “in country” change over time, rather than comparing to the US as an external benchmark. When you have set your number formats and converted these Measures to Discrete Measures (or Dimensions), you can start to assemble a busy looking Rows shelf:
Now it’s time to add in the Continuous time series data:
I could have plotted a table calculation of the percent change relative to the first date, but elected to plot the [Dollar Price] instead. To convert these into “sparklines”, it’s just a case of editing the axis, unchecking “Include zero”, and setting the range to “Independent axis ranges for each row or column”:
Once the [Dollar Price] header is hidden, things start to look good. Next it’s the simple LAST() table calc trick to get the “dot on the end” of the line. The calc is:
If it’s the last record across the table, then pull through the [Dollar Price]
That calc added to the Rows shelf, set to a Circle, converted to a Dual Axis and then synchronised gives us a dot (remember to hide the header and increase the size of the dot until you’re happy). At this stage, it makes sense to add a splash of colour to the second axis to denote whether the country has seen an increase or decrease in Dollar Price relative to the first date – crazily simple:
It’s another boolean – it’s true or it’s false. Whacking that on colour, adding a border and selecting your colours gives you this:
Now then – how do we get a “title” above that line chart so people know what they’re looking at / gain an idea what to do next?
This is an old trick but a good one. It creates a column field label which can easily be hidden and then the label itself can be realigned as you wish. The downward arrow character is taken from a website linked below.
The tooltips are easy ones and I elected to not use the worksheet action Rodrigo used, as I don’t think it makes sense to use a highlight action on a tall viz where you can’t see all of the countries in the view. For me the key analysis is comparing the movement within the country, rather than comparing it against all of the others.
For the title I used this website to bung some geometric shapes into the title, to act as a mini colour legend:
And the smallest of small tips is the use of the oft-overlooked Caption feature. I used this on the worksheet to include the data source, attribution etc.:
It’s a good thing to do, as it saves you from messing about with an extra text object when bringing the dashboard together at the end.
And that’s that. My final viz isn’t precisely the same as Rodrigo’s, but it is certainly inspired by it, and it was fun to recreate. As stated in my last post, I fully intend to recreate a viz from each #MakeoverMonday recap, so let’s see what the next week brings!