Select Page

Renewable Data Visualisations

As with many of my blogposts here, this one opens with a tweet, since it was the starting point in this exercise for me. Cole Knaflic commented upon Jon Schwabish’s reworking of a Eurostat chart showing progress of European nations against their renewable energy targets for the year 2020.

Some further discussion followed, which led Jon to post his work to the HelpMeViz section of his website. I’d never encountered this before, but it’s a fantastic resource to follow community attempts to rework a visualisation – either through proposing alternative approaches or iterating upon others’ work.

I was taken by Andy Kirk’s suggestion to differentiate between the nations which had and hadn’t already exceeded their targets, but had no idea how to achieve it, so I decided to have a go. I often find that trying to recreate others’ work is a great way to learn new skills with Tableau, so set about to do that and then to see if I could also distinguish the nations according to Andy’s approach. Challenges like Workout Wednesday are brilliant for this kind of thing, and when we were in the same workplace Pablo and I used to run a similar exercise with colleagues internally to encourage upskilling.

Here’s the full view of Jon’s interpretation:

To show those nations which had already achieved their targets, I took a combined approach – darker grey both on the line connecting the dots and also the text label, and a lighter for those who still had some way to go. Shading the bars differently was the easy part – Charlie Hutcheson recently put together an excellent blog post on connected dot plots using Gantt bars which I would recommend anyone use as a resource and see no point repeating. The only extra bit I employed to colour the bars was to create a boolean measure to identify whether the 2020 target had been exceeded by the 2015 value, and then place this on colour:

And here’s the outcome – darker grey bars where the rightmost circle mark (for 2015) exceeds the vertical bar mark (for 2020 target).

The challenge I had, however, was repeating the exercise with the labels. I knew that I wanted to create two alternative ‘Nation’ dimensions, one each for those nations that had and hadn’t already exceeded their targets, place them both on Label and colour them in the Label text accordingly. My original approach was to use the same boolean measure but this failed since I was comparing aggregated and non-aggregated fields:

Cannot mix aggregate and non-aggregate comparisons or results in 'IF' expressions

A little research led me to the solution, though – using an LOD calculation on that same boolean measure, and then pointing my two alternative dimensions at that:

The last element was adding both of these into the label, which I placed on the horizontal bar (rather than one of the circle marks), aligned to the left and used a sneaky trick to add a little spacing after the label to prevent it from overlapping with the first circle. To do this I added a full stop and coloured it white, as shown:

The result is my iteration upon Jon’s work, as shown below, and also available to download from Tableau Public. In addition to the colour-coding I also placed the nations in ascending order and changed the connecting horizontal bars to only join the 2004 and 2015 values and not also to the target value as Jon had. To my mind this helped to show the progress of each nation and also so that the target values stood out effectively for each of the nations yet to get there.

I’d love to see any further iterations on my work, and I’m sure that Jon would too – he invites anyone to do so and feed back on his blog.

Featured image originally by Chris Lim, used under the Creative Commons licence.

About The Author

Mark Edwards

A statistician at heart, Mark’s approach is always numbers-led. Already visualising data in other side-projects, Mark was introduced to the world of Tableau in 2016, when he and Pablo started working together in financial services. A keen participant in social Tableau challenges, Mark is building his skills and appreciation of powerful visuals, discovering interesting and untapped data sets, a path that has already led to a new career and a range of further opportunities.

Leave a Reply