This will be one of the last few of my Tableau blogs until 2022!
This will also be the final Polygon blog for the series, before I get a public lynching from the Tableau community for ruining every best practice that exists, ha.
Polygon V003: Building upon sizing measures and adding flair.
Each blog, I will link some interesting artwork from the data visualisation community and showcase a small snippet of how a similar effect can be done within Tableau. None of the visualisations I produce will be considered fully complete, just half-baked ideas, that I hope help others think differently about design.
This blogs inspiration is this US Hate project by Marianna Piazza, Silvia Castagna, Maria Alma Girasoli – which I came across on Behance. Followed by this Let’s stay home visualisation by Francesco Pontiroli and Benedetta Signaroldi.
From Polygon blog part 1 and part 2, we will have covered off some of the methods to recreating this visual using polygons. Such as, rotating a shape, plotting multiple shapes on a page, joining the polygon marks up effectively, and transforming the shapes in terms of size and position.
The final piece to the puzzle I want to make is the dashed effect seen in the Let’s stay home visualisation.
I have briefly covered-off how this is done for circles in a previous UEFA blog.
Today we will look to apply the same logic but to a square/rectangle. In this case, it is a fun way of showcasing offsets from an original.
The negative to this methodology is the amount of additional rows of data that it requires in order to make what simply is a bar chart.
To follow along, download the dataset from the top of the page, alongside the link to the workbook.
Join your dataset with a custom calculation of 1=1.
You will see the Start X and Start Y plot a simple square. If we plot these points and join them using a path, It would create a simple line/polygon square. This is concepts we have covered off in V001 and V002 of this blog series.
The end X and End Y are the same points but offset to say the end of the path is the start of the next path. All will become clear when we look at the calculations but for know just know we need to know where our path starts and finishes.
I’ve labelled these to make it easier to understand, and colour coded it in the excel for extra clarification.
The last thing to note is our second Tab of data that has two columns.
T is the number of points we want between each line. Line Detail will be used to create how these values are split out (I.e used to make a full path length into dashes)
Download the workbook to follow the rest of the tutorial, it can be found at the top of the page under the title header.
Firstly we find the total distance between the start and end point of our lines.
We take the total length of the distance and divide it by the number of points (T) we have.
We use a fixed calculation because we want to maximum value of T (In this case 11, for all our rows of data)
Finally, we want to take the start point and add the required distance of the spacing for each extra value we want to plot.
All goes well you should be able to recreate this:
So far we have taken the start and end co-ordinate, added in extra points of equal measure in between! fun.
Even with the added points we can still make our polygon or lined square.
So now with our individual polygon plots sheet, how do we create it to be a dashed line?
Drag Line Detail onto the detail mark. It will split the dashes out by what you have in this column. For example in the above it joins two of the marks together.
Of course, you can amend the column of T and the Line Detail to create different length lines and points.
For today, we will end it their for the half-baked mess. Obviously you can apply these calculations to almost any shape.
Here is me playing around to create a similar viz style to that of Francesco Pontiroli and Benedetta Signaroldi. I’ve included the data I used to create the below from the Github Repo as a reference point.
If you’re a little lost as how I made the rectangles for this – I’d recommend revisiting blog 002 of the series that covers of creating polygon shapes!
The above chart was used making the ‘extra’ excel sheet within the google drive. It can be a little complex to digest, so as a brief reminder, remember I plot each of the original base points, allocate 4 points to join up for each bar (or more if its the dashed line).
My data joins are as below. With Data joining to the base on shape, and then the join sheet left joining to base on a 1 = 1 relationship. These joins are covered off in poylgon blog v002.
Some final thoughts:
- This method does increase the dataset size quite drastically.
- Personally I think its quite artistic the dashed line effect within circles, squares and diamonds. It’s subtle yet effective to show change of previous measures.
- It allows quite a lot of flexibility in terms of how long you want the dashes. You will have seen in my UEFA viz, I use two different lengths of lines to represent two different categories of match results.
Use the ideas outlined in Polygon 001,002,003 sparingly and with what you consider good effect. I’ve put together this short series really so people can understand different ways of approaching a problem that are a little different to the norm. If you’ve enjoyed the series please reach out, I’d love to hear your thoughts.
I can be reached on Twitter, @_CJMayes.