This week, I was teaching mapping and spatial calculations as part of the LWDSL (Learn what the Data School learns) series. I have actually learnt a lot whilst prepping for the session myself! One of the things that I finally understood was how to do was a hex-tile map (for the US). It is especially useful if we want to eliminate the chance of overlooking some states as they might "disappear" from the map simply because of their size. So how do we do it?
- Have a dataset with the US state names or abbreviations you wish to visualise
- Connect this dataset with the one that attributes column and row coordinates for each of the state (download from here; the link was borrowed from tableau.com). Make sure you do a left join, where your main dataset is on the left and the one with the coordinates - on the right. The common field will be either state names or abbreviations
- Bring field "Column" to columns (average them) and "Row" to rows (average them, too)
- Add hexagon image to My Tableau Repository -> Shapes (download the picture from here; the link was borrowed from tableau.com as well)
- Change type to Shape (on the Marks card) and select the hexagon as your preferred shape
- Drag field "Abbreviation" to detail and to label, turn on the label and let it overlap
- Fix the axes until it looks decent - I have chosen X axis to be from 0-15 and Y axis from 1-9
- Format the rest of your map as you wish - and voila!