Hex Maps revisited - is it a good way to visualise data?
Visualising data in HEX Maps isn’t something new with Tableau. It’s been covered at some length in various posts, papers and not to mention in various sessions at our grand Tableau Conferences. However, this week I was asked by one of my customers to run a small workshop on the topic and introduce a few ways HEX maps can be generated and discuss some value points behind the technique. After all, is it a good way to visualise data on a map, or just pretty colors on a dashboard that increase confusion and dilute the appropriate message? Personally, I like to believe that a message can be powerful and clear, yet nice and colourful at the same time. I usually expect my audience to be able to digest both when presented with a data visualisation.
I started to read up on some of the documentation and examples already out there and found some great material by the Tableau ambassadors, Toan Huang, Ken & Kevin Flerlage and Andy Krieibl. I tested some of their techniques, borrowed a few examples, and created a few of my own. In addition, I really wanted to understand good use cases of HEX maps and I found some good material on that too.
What are Hex Maps?
First of all, for those new to the subject: what is a HEX map, really? I went to wikipedia and looked it up, and it says “A hex map, hex board, or hex grid is a game board design commonly used in wargames of all scales. The map is subdivided into a hexagonal tiling, small regular hexagons of identical size.” Hex Maps, or Tile maps, are basically maps of an area using uniformly-sized shapes. Hex maps are simply tile maps using hexagons and the tiles may be circles, squares, hexagons, etc. For ex, a country map could use hexagons are utilised to represent each state or region.
OK, sounds good. This is most likely a quite neat way of also visualising data on a screen. We’ve seen good examples of that. But again, is it a good way to visualise data?
Is it a good way of visualising data?
I am usually a stickler in terms of data visualisation best practice, and I try to adhere to it myself all the time. I also encourage customers to do so, because it increases the chances of their intended audience to see and understand their ambitions with the visualisation many times over. So is the use of Hex Maps leveraging data visualisation best practices, really? The answer to that is, both yes and no. There are times when a Hex Map (and many other visualisation techniques) really does not work well and completely dilutes the data ambitions. But there are actually a few times when in makes very good sense.
Hex maps have become the standard when visualising data where the sizing of the geographical region is unimportant. A good example I found on Ken & Kevin's site, in the USA, Western states are larger in area and give the impression of more visual weight, when in fact Eastern states are typically more populous. For instance, the state of Montana, with an area of 147,164 square miles is eighteen times larger than New Jersey in size. But New Jersey got nine million inhabitants, almost 9 times the amount of Montana. Plotted on a normal, filled map, Montana would “out-size” New Jersey and carry more “visual weight” than the more populous New Jersey. Hex map removes that artificial nature of more weight being placed on larger states.
Similarly, on a global map, centered on Europe, larger countries like Russia would take up proportionally more space and smaller countries, like Denmark, Luxembourg, Netherlands, are more difficult to see on a standard map because of their small geographical area. Because they appear so small on the map, it can be difficult to select or hover over these states and nearly impossible to place any types of labels.?Again, a hex map eliminates that issue because all states appear the same size. Depending on the use case, and ambitions of visualisation, a Hex map may actually be a pretty good way of visualising geographical data. It may in fact be the best way.?
How to do it?
Hex Maps on a Tableau visualisation can be achieved in many ways. Previously, a lot of calculation efforts was needed, and although it can appeal to many. We now got better support for standardised geospatial formats, like .json and geometry shape-files. I prefer to use the standardised ways when applying technique, because I believe it will be more compatible and future proof. However, important to state: There are many ways of achieving the same result in Tableau, regardless of challenge. Here I will present a few good ones that I prefer.
Importing a .json file
领英推荐
There is a really good site called amcharts.com, that I discovered on a blog-post by Toan Huang, and literally any map can be found and created here, using the embedded Pixel Map Generator (Beta). Basically any map format can be created, from all over the world and applied with for ex. hexagon. If I search for Sweden, download to HTML, I can copy the mapping parts into ATOM and save the output as a .json file. The .json file is a standard datasource format for Tableau and we import it natively and I can begin my visualisation and apply Hexagon shapes.
Standard Shape-files
Tableau provide great and native support for the most commonly used shape-file formats on the market, for ex. ESRI, MapInfo, KML, GeoJSON, etc. More on that Spatial File and Create Tableau Maps from Spatial Files
If I got access to a really good shape-file, I can connect to it using the standard native shape-file connector and leverage the Geometry object for visualisation. In addition, I can join the shape-file with more granular data and be able to apply traditional Tableau visualisation objects into the map, for ex numbers, amount, profitability, etc. This provides great flexibility in making the Hex Map fit into the overall dashboard and story.
Join & Blend geospatial data
Adding a map to a canvas may, or may not, always provide the necessary insight and impact you had in mind. Therefore, it is very wise to explore the possibilities of blending or joining the geometry data with more granular datasources, as explained a bit in the section above. This is where Tableau really stand out and is able to provide a very deep and thorough data visualisation experience and you are able to truly express the impact of the data and reach maximum level of insight.
Feel free to connect with me directly here on Linkedin or via official Tableau channels. If you want to access the workbooks I created I am more than happy top share the files.
I also want to express my sincere gratitude to the great Tableau Ambassadors that free and openly share some of their most spectacular tricks and tips on how to maximise your Tableau skills and ambitions. I have read and used a lot of good material from Ken Flerlage, Kevin Flerlage, Toan Huang and Andy Krieibl and their blogs:
https://www.flerlagetwins.com
https://tableau.toanhoang.com/
https://www.vizwiz.com/