top of page
Search
Writer's pictureJames Goodall

Tableau Bitesize: UK Hexmap

This blog post will go through the process of creating a hexmap of the UK. This is a type of chart that gives a slightly different take on the standard map. It should however be used with caution as it’s recommended to only be used for countries that have a somewhat recognisable shape, but it works very well for the UK





So how do we do it? Well, start off by connecting to the ‘Hexagons (UK Counties).csv’ file attached below:



This file already has the X/Y coordinates of all the counties plotted

Next, join the ‘VACANT_DWELLINGS.csv’ file (attached below) via a left join on ‘County’

Drag the ‘Column’ measure to the ‘Columns’ shelf and the ‘Row’ measure to the ‘Row’ shelf, both as Dimensions



Change the chart type to ‘Shape’ then set the shape to be a hexagon



These don’t come as default in Tableau so you will have to manually add one. I have added an image you can use for this below. Simply add this to a sub-folder in the ‘Shapes’ folder in your Tableau Repository then click ‘Reload Shapes’ and it should become available then increase the size of the shape


Next, we want to colour only the shapes that we have data for. Create a calculated field called ‘Colour’ with the following formula



This creates a Boolean type field that we can then drag onto the ‘Colour’ mark and assign one colour to ‘False’ (the one we want to stand out), and another to ‘True’ (the one we want to sit in the background)


Now, we want a label to how on the shapes, but again we only want this to display on the shapes we have highlighted. To do this, first create a calculated field called ‘Adjusted Label’ with the following formula


Drag this onto the ‘Label’ mark and format to your choosing


I then also dragged the ‘County’ field and the ‘Total vacant dwellings’ fields to the ‘Tooltip’ mark so these could be displayed there


Finally, format the worksheet to remove all lines & borders and hide the headers



Don’t worry that the map looks a little odd – this will be sorted when we build the dashboard

Next, create another sheet – drag the ‘County (VACANT_DWELLINGS.csv)’ field onto Rows and the ’Total vacant dwellings’ measure onto the ‘Columns’ as SUM, and adjust the formatting as required. I also added an ‘Average’ reference line

Now we can build out the dashboard. Add a title, then drag the hexmap & bar sheets onto the view. You will then likely need to play around with the size of the hexmap sheet and likely the size of the shapes as well. For now this is a somewhat frustrating activity as it involved jumping back to your sheet, changing the size, going back to your dashboard to see how it looks and back again, then repeat until you are happy. Here’s hoping Tableau introduce sizing edits at the dashboard level!

Next, I added a dashboard action to highlight selections from the charts



But apart from the slight annoyance of the sizing, with the template provided this is relatively easy to build and engaging visualisation technique – I hope you think so too!


61 views0 comments

Recent Posts

See All

Comments


bottom of page