How To: Hex Tile Maps in Tableau
Brittany Fong wrote a cool blog post about how to create a tiled map using Tableau. As soon as I saw it, I started researching the usage of this type of map, and I found an article about hex tile maps. I knew this was possible in Tableau, so I used Brittany's instructions, and then I manipulated the data to fit a hex map.
First, I added the hexagon shape to the Tableau shapes repository. Next, I needed to create a file that would align the hexagon tiles to build the hex map. The file can be downloaded here. I rearranged the map a bit compared to the article that I referenced. After I searched Google images for a bit, I found a different layout that was more accurate geographically, so I moved DC out by itself.
Now, to build the hex map:
1. Add Row to Rows
2. Edit the axis for Rows and reverse the scale
3. Add Column to Columns
4. Change the mark to Shapes
5. Choose the custom hex shape that you added to your repository
6. Drag Abbreviation to the label, set the vertical and horizontal alignment to center, turn on allow labels to overlap other marks
7. Hide the headers
8. Adjust the size to get the preferred amount of white space.
9. Add the worksheet to the dashboard and resize until the spacing is correct. 450 by 300 worked well for me.
That's it! Check out a before and after of a recent Viz of the Day.
Great post! I'm glad I was able to inspire you :)
ReplyDeleteOoooooh, so cool! Love it!
ReplyDeleteThanks Kelly, that means a lot coming from you. It was so nice to meet you in Vegas!
DeleteStunning! Thanks for sharing!
ReplyDeleteThanks, I hope you find it useful!
DeleteI tried this out, but I had to rotate the hexagon png you linked to to replicate results.
ReplyDeleteThanks, for pointing this out! I completely forgot I had to rotate it. I have added a link to a rotated version.
DeleteHi - just an update. I went through the instructions and you should add that you need to do a reversed scale on row for this to work properly!
ReplyDeleteDustin
Thanks for pointing this out. I did indeed forget that step. I have updated it.
DeleteHey Matt, would you be interested in posting some of your beautiful visualizations such as this one to my open data site (Datazar.com)? Datazar’s mission is to make available all of the world’s open statistical and experimental data. We also love amazing visualizations like this. We could even set up a SirVizAlot hub for you so you can have your own spot to post your content. You would be completely free to link the source of your content back to this blog and obviously it would be completely free for you to use our platform. Let me know!
ReplyDeleteBrian
I did the same thing two months earlier with a different state layout:
ReplyDeletehttps://public.tableau.com/profile/krislikesmath#!/vizhome/USStateHexmapAccidentDeaths/HexStateMap
I also have a rounded hexagon for anyone who's interested.
Also, kicking DC out to the side probably is the best option. It avoids the log-jam in the North-East
DeleteNice work Kris! I hadn't seen your version before.
DeleteThis is excellent. Thanks. I'm sending my art people to this blog immediately.
ReplyDeleteI'm late to this party. Nice work and thanks for sharing the shape file and spreadsheet. That was a time-saver.
ReplyDeleteNo problem! Glad you found it useful.
DeleteThis is really great. I have one question: I can't seem to get the states on the corners to fully display; no matter what I do with sizing, they get cut off. I've tried them as discrete, continuous, dimensions and measures. And I cannot edit the axis to make it fixed. This must be something really simple I'm overlooking. Any ideas?
ReplyDeleteHey Jon, could you publish your workbook and let me take a look? I'm not sure what it could be. I used automatic on my axes, and it worked. Do you have include zero on?
DeleteThis is Good for me... Thanks for sharing.... Tableau online training
ReplyDeleteyour blog is such a wonderful and nice library which filled with lot of technical stuff please share with us
http://www.sbrtrainings.com/tableau-training.html
Thanks for the useful tips. I couldn't find anyone who'd tackled the map of Europe this way, so I've had a go myself. Data and some commentary are here: http://statsexplorer.blogspot.be/2016/03/tile-based-maps-and-service-unit.html .
ReplyDeleteDear Matt.
ReplyDeleteThe Technique and methods which you used is really tremendous. Its our privilege to have you .Your every blog post is unique and you are teaching something new to others. Keep up the Good work and keep guiding us with your tableau Skills
Thanks Rajeev! Glad you found it useful.
DeleteMatt,
ReplyDeleteI, too, am a Tableau newbie. But I've been making progress. I very much want to make hex maps part of our exhibit tool kit. Using your instructions and links I have my first hex map just about where I want it. Two problems remain. Most grateful for any tips. 1) State abbreviations are lining up below each hex cell and I want them inside the cell. How might I fix? 2) How do I reduce the amount of white space between cells to get them nice and snug next to one another as in your example?
Thanks
Larry Wheeler
Managing Editor
Health Affairs
lwheeler@projecthope.org
Hi Larry! Thanks for reaching out. Make sure your labels are centered horizontally and vertically, and that should line them up the way you are expecting.
DeleteGetting rid of the white space is tricky. Most of it is trial and error resizing the hex shapes and the worksheet in the dashboard to get it to look nice. I found 450x300 worked for my hex map on this dashboard https://public.tableau.com/profile/matt.chambers#!/vizhome/BodyCameraLaws/BodyCameraLaws
Thanks for the quick response. I'll poke at it some more and see if I can get it to behave. Have a good weekend.
DeleteElegant solution. Creative and simple approach. Big impact!
ReplyDeleteGreat idea. Thanks for sharing the proper explanation about how to create Hex Tile Maps using Tableau. I found one more good resource related to Tableau which i am sharing with you it will give you detailed knowledge of Tableau Just have a look at this link: https://intellipaat.com/tableau-training/
ReplyDeleteI just came onto your post and found it quite interesting. I am also associated with Tableau Support, Tableau Consultant, Tableau Admin, Tableau help, Tableau Services and love to enjoy the stuff on the same as its rarely found on internet. Thanks again for writing such a good post.
ReplyDeleteTableau Support
Thank you for the post Matt. How do you go about creating the row and columns for UK if I wanted to do something similar? Appreciate your help and support. Has anyone created the row, col co-ordinates for UK region?
ReplyDeleteIt was just trial and error to arrange them the way I wanted. Yes, Ben Moss created the UK version: http://www.thedataschool.co.uk/ben-moss/vizlikeanartist-hex-mapping-in-tableau/
DeleteHi Matt,I have one question about the data. Which tool can I use to get the grid map data?
ReplyDeleteAppreciate your help and support.