Equinox IT Blog

Visualising spatial data using Tableau

Recently I’ve been having a bit of fun exploring ways to visualise spatial data more effectively. I’ve long been an enthusiastic advocate of data visualisation techniques and I also have a lot of background with spatial data, having spent several years as the architectural lead on the Landonline project, which captured all of New Zealand’s land records, so combining the two interests seemed a natural thing to do.

As regular readers of this blog will know, we use a product called Tableau extensively in the Performance Intelligence practice at Equinox for analysing system performance metrics. So when the latest release of Tableau recently extended support for visualising data spatially, I couldn’t wait to see what the power of Tableau’s visualisation techniques could bring to all that New Zealand spatial data which Landonline helped make publically available.

Unfortunately though, Tableau’s support was limited to the set of spatial boundaries that are built in to the product. There is quite a good break-down available if you are in the US, and generally some sort of regional breakdown for most other countries, but there is currently no ability to extend the available boundaries.

Not to be deterred, my rainy-day project over the Christmas break became seeing if I could extend it for myself. And with the help of some open source spatial software and a fair bit of determination, the answer is yes – though it does mean stepping out into unsupported territory, somewhat. Visualising Spatial Data - visualisation of tsunami risk zone data in Wellington

Here’s the first thing I did once I had worked out how to load additional boundaries. This is a view of the Tsunami warning zones around where I live. The view combines the Tsunami boundaries available from the Porirua City Council with Street Address data from Land Information New Zealand and Meshblock data from Statistics New Zealand, and allows the results of an address search to be shown with the meshblock containing the address overlaying the local Tsunami zones.

That’s all very well, but it’s not really using any of the data analysis capabilities of Tableau, it’s just using it as a drawing tool: the equivalent view would be easy to produce with any number of GIS packages.

The real power comes when combining different types of data from multiple sources, and I have various half-finished examples just waiting to be blogged about.

But a great little example that has nothing to do with NZ came up a few weeks ago when I got an email from Shawn Wallwork, who, like me, is a regular contributor on the Tableau user forums. Shawn makes extensive use of Tableau’s mapping capabilities for the work he does for his clients in the advertising industry in the US and was an enthusiastic early adopter of my “hack” for extending Tableau’s maps when I shared it with the Tableau community.

Shawn described an idea he had to help answer a very common request he gets from his advertising industry clients. Various types of advertising are tightly geo-targeted – usually at the ZIP code level for his US clients. For example, direct mail campaigns target households within a specified distance of a store and online banner ads are placed based on the (approximate) location of the user’s IP address.

The perennial question is which ZIP codes to target to give the most cost-effective coverage. Answering that question needs an effective way of assessing the relevant demographic data, taking into account the spatial distribution of the target demographic groups.

Shawn and I decided to combine forces on putting an example together showing the approach we have come up with. Knowing that I’m a keen windsurfer, Shawn invented a direct mail campaign for an imaginary windsurfing shop in Colorado Springs, which is where some of his real clients are located. The visualisation below is to support the decision about which ZIPs should receive the mail-out.

 

Explore the visualisation by selecting different demographic groups and varying the radius of the target circle. Hover over ZIP codes on the map or bar chart to see details, and exclude ZIPs from the totals using the Exclude option in the tooltip or using the ZIP selection list down the side. Click on a ZIP on the map or bar chart to see it highlighted in the other view.

Notice how the colour-coding on the map indicates the numbers of the selected demographic group within each ZIP code for the ZIPs inside the circle, and highlights the ZIPs that are partially or wholly outside the circle.

The totals at the bottom show a couple of key indicators for the currently selected ZIPs: the estimated total for the selected demographic that fall within the selected radius and the estimated percentage of households that fall outside the chosen radius.

The key point here is that whilst the target is defined by distance from the store, the advertising has to be bought by zip code. So there is a judgement call to be made about the ZIP codes which cross the boundary. The estimated numbers shown here are based on apportioning the demographic totals for the whole ZIP, in proportion to the land area of the ZIP code that falls inside the circle. Clearly that is a simplistic assumption, but coupled with local knowledge about the location of population centres, it is still helpful.

Shawn has written up a fuller description of the business need and how this visualisation addresses it on the Tableau Community site, here. He describes the rave reviews this “instantaneous what-if machine” is getting from his clients.

Whilst the visualisation embedded in the blog is very effective, it is somewhat constrained by the long, thin format of our blog template. Also the web delivery mechanism is inherently less interactive and less responsive than the Tableau desktop version. If you are interested in seeing the full effectiveness, you can download the workbook from the download link in the bottom right-hand corner and also download either Tableau Reader (which allows you to view but not create visualisations) or Tableau Public (the free version of Tableau which allows you to develop visualisations for publishing in blogs and suchlike). Either of those will allow you to explore the full interactivity on your desktop.

Any Tableau users wanting to know more about how to extend Tableau’s spatial support can read about my “hack” utility in this Tableau Community Viz Talk article. Alternatively, Robert Mundigl has written a great set of “how to” instructions on his Clearly and Simply blog, which perhaps offer a gentler introduction. Bear in mind, though, that generating this visualisation has made considerable use of a GIS database and GIS utilities to prepare the data for use with Tableau and does also rely on my unsupported method of getting the shape boundaries into Tableau.

Free recorded webinar: Managing software performance risk - why performance test at all?

Subscribe by email