Data Viz Done Right

June 28, 2017

Workout Wednesday: UK General Election Slopey Trellis Chart

That Emma! She's quite the sneaky stinker! For Workout Wednesday Week 26, she asked us to build a trellis chart full of slope charts that compares election results by political party by constituency for 2015 vs. 2017.

Fortunately, I have my trellis chart calcs safely saved in my notes, so I didn't have to Google those. The tricky bit for me was the sorting. I'm not going to spoil how I did it for you, but you can download my workbook to see how I did it. As usual, Emma and I took very different approaches for the calculations required for the sorting. She used LODs for all of her calcs, I only used one. They both work though! It all depends on how your brain works I suppose.

The data prep parts were pretty straight forward (thank you Emma for alerting us to the need to do this). Emma loves little tricks in the formatting, but I didn't see any this week.

One thing I did different was to provide a "buffer" for the year labels. I place them 10% above the highest value so that they don't overlap the slope chart lines. Emma's year labels sometimes overlap with the slope chart lines. Just a personal preference for me.

Great fun Emma! Thanks! Took me about 90 minutes including this blog post on the train from Frankfurt to Hamburg. Great use of my time! #AlwaysLearning

Click on the image for the interactive version and to download.


  1. I was also inspired by the slope charts in the FT. But i tried a version where the charts also included the 2010 result (not sure 3-point charts are strictly slope charts but they seem to work here). And instead of making a single grid of charts for every constituency I linked them to map so the geographic link was clearer. This means all the charts are accessible but only one at a time. Not sure it is better but it is good to see different alternatives. Mine is here:

    1. Nice work, but as soon as you add a third point, it becomes a line chart.