Converting Spatial Data for Use in Tableau or Alteryx

by Peter Silvester

When we have access to location information in a data set it can be great to visualise what is going on with a pretty map or do a deep dive into spacial analytics. Tableau and Alteryx are both incredibly useful for these processes but unfortunately it is not possible to seamlessly switch between the two without making some changes to your data.

When we work with geographic data in Tableau we are either looking at a plot of the latitude and longitude values with a map as the background image. Alteyx handles location analysis slightly differently and spatial processing must be done using Alteryx’s own spatial object field types. Spatial objects include:

  • Points on a map (like a single lat/long value)
  • Lines between more than one point
  • Polygons of an area made up of joined up lines

Luckily there are some simple tools available that allow us to manipulate our data so that we can do spatial analysis within Alteryx or output our data and use it in Tableau.

 

 

Create Points Tool

If you have data  with latitude and longitude fields then the Create Points tool will allow you to convert these to a single field that is usable in Alteryx. Simply select the fields that contain your latitude and longitude data, run the workflow and it will create a new field that contains your point objects. For a full run through of the Create Points tool check out Megan’s great comprehensive blog.

Quick Tip:
It is good practice to always stick in a Select tool whenever you create a spatial object in Alteryx and rename the field you just created. It can get really confusing when you are doing spatial analysis if left everything as default and its all called ‘Centroid’.

 

 

Spatial Info Tool

To go in the other direction and create latitudes and longitudes to use in Tableau it is as easy as checking a box in the Spatial Object tool. Drag the tool into your workflow, check the ‘Centroid as X and Y Fields and Alteryx will create two new fields that give the latitude and longitude of each of your records. Spatial Info is also necessary for converting Lines and Polygons to be used in Tableau. The only difference is that before the tool can do its work you must add in a Poly-Split tool to break down the line/polygon into its constituent points.

There are a number of options for data manipulation and creation within the Spatial Info tool, including the ability to find the length of a line or the area inside a polygon in your data.

 

 

create-point-spatial-info

Avatar

Peter Silvester

User Roles in Tableau Server

2 mins read

Thu 01 Dec 2016

Level of Detail Part 3: Exclude & Include

2 mins read

Fri 25 Nov 2016

Level of Detail Part 2: Syntax & Order of Operations

2 mins read

Thu 24 Nov 2016

Level of Detail Part 1: Introduction

2 mins read

Wed 23 Nov 2016