3 December 2014
It is slightly ironic that while preparing last weeks post for the Show Me How series on Heat Maps in Tableau I was also preparing this, rather more complex post, on another form of heat mapping in Tableau - this time in the form of chloropleth maps.Heat Mapping in this sense is straightforward in Tableau when in the form of Polygons datasets or points in just a few clicks, however it can be difficult to achieve any sense of further geographic analysis such as thematic gradients. In this post I want to explore I have worked around that problem using Alteryx, and show you how you can use a simple web application built in Alteryx to do the same.
Easy in Tableau
(stay tuned to our Show Me How series to find out how to produce these)
Hard / Impossible
The below thematic gradient map is difficult, especially where we only have point data. It shows areas of high concentration as a deep red, and low concetration as a blue - hence the heat map naming (hot -> cold). In this case the map below is actually showing temperature, but similar maps can be used to show population, etc.Where something is hard or impossible in Tableau then I like to take it on as a challenge.Alteryx to the Rescue
Many of our regular readers will be familiar with my love of Alteryx and what it allows me to do with Tableau that just wouldn't be possible otherwise. This is definitely even more true in the geospatial world, Alteryx beats any other piece of BI / analytics software you care to name hands down when it comes to producing data for mapping.If we have some points of data we want to convert into a heat map the process is actually quite complex, here are the steps:1. Build a grid of data points, the size of the is dependent on the resolution of the map needed.2. For each grid square (X):a. Find the data points within that grid square X and sum their 'heat' (e.g. sum their population)
b. For the neighbouring grid squares add their data points heat but reduced by a factor that is inversely proportional to the distance from grid square X.
Imagine doing this for many thousands of grid squares that might make up the UK or US and you can quickly see why it may be difficult and time consuming. I've flirted with the Table Calculations needed and it's not straightforward, especially if you don't have a pregenerated grid of data - which we don't in most cases!Thankfully a lot of this logic is already written into the 'Heat Map' tool in Alteryx, however it only creates a 5 polygons containing points of similar 'heat' for use as shape files or reports in Alteryx - useless from a Tableau point of view.