community
cancel
Showing results for 
Search instead for 
Did you mean: 

Engine Works Blog

Under the hood of Alteryx: tips, tricks and how-tos.
Alteryx Alumni (Retired)

As someone who was completely new to Spatial Analytics a year ago, I wanted to help Alteryx users understand what its all about and clear up some common misconceptions about what you can and can't do in Alteryx using the Spatial Tools.

 

First of all, a little background for those who maybe aren't aware of Alteryx's Spatial Analytics heritage.  Prior to renaming as Alteryx in 2010, the company was called SRC (Spatial Re-engineering Consultants) and were focused on providing professional services to the three Rs (Retail, Restaurants and Real Estate).

 

There have been significant improvements and enhancements to the product over the last few years and perhaps if your initial exposure to Alteryx has been in other areas such as data blending, predictive analytics or working with data visualisation tools then you've not yet had the chance to get to grips with the Spatial Tools.

 

What can I do with the Spatial Tools?

 

From a very high level, you can take any data with geospatial content (e.g. a store location or a customer location) and begin to use this to enhance your analysis.  For a deeper dive into the subject, I highly recommend this excellent article How geospatial data is transforming businesses and saving lives in 2016

 

If I don't have the Alteryx Spatial Data Bundle, can I still use the Spatial Tools?

 

Yes, all of the core tools can be used with your existing data.  The Spatial Data Bundle allows users to enrich their existing data with Tom Tom content.  There are specific address geocoding tools that will only work if you have the Spatial Data Bundle installed and some of the tools (Distance, Trade Area, Find Nearest and Non Overlap Drivetime) have options to use Drivetime data.  The Non Overlap Drivetime tool is the only tool exclusive to the Spatial Data Bunddle.

 

What does Address Geocoding give me?

 

The Alteryx Geocoding tools allow you to take address data and create spatial points to visualise where these locations are on the map: -

 

Geocoding.png

 

 As you can see from the image above, we can achive two levels of accuracy when geocoding address data.  The Tom Tom Geocoder uses the full address data (Address, City and Postcode) so this gives us the closest point to the property (in this case my house).  The Street Geocoder is based on the centriod (middle) of the Postcode so is less precise.

 

Depending on what type of analysis you wish to perform with the data then the less precise option may be acceptable.  If for example you simply want to know how many customers are within five miles of a store then I suspect that the Street Geocoder results would be fine; if you were looking to validate employee mileage claims then perhaps the more precise option is the best bet.

 

Whilst the Tom Tom Geocoder is more accurate, it does require an internet connection to be run as it is using Tom Tom's API.  As a result it is a little slower to run than the Street Geocoder which is using data installed locally.

 

What if I have incomplete or partial address data?

 

The Street Geocoder only uses the Postcode value so if you don't have a Postcode then you will simply get no results; the Street Geocoder only recognises full values so you can't work with partial Postcodes.

 

The Tom Tom Geocoder will accept address missing values and partial Postcodes.  If for example you only enter London in the address field then it will create a point in the centriod of London.

 

What Geocoding alternatives are there if I don't have the Spatial Data Bundle?

 

There are a wide variety of commerical products in the market that can provide this feature but you can also use "free" options such as Google Maps and Bing.  If you only have a small number of records then you can quite easily extract the address co-ordinates from the URL: -

 

Google.png

 

 As you can see in the image above, I've highlighted where the latitude and longitude values are shown in the URL.  You can easily cut and paste these values or use the Download Tool to obtain the results and extract the data for use with the Spatial Tools (I'll show you how you can use this data later in the article).

 

Please note that I put the term free in quotes, if you want to make use of Google or similar platforms in a more automated way then they do have limits on the number of searches you can perform before they start to charge so it may not be a cost-efficitive solution for all.

 

What can I do once I have created spatial objects from my data?

 

As you can see from the image below, there are several Spatial Tools you can use in Alteryx:-

 

Spatial.png

 

Firstly, lets look at how we can start to understand the relationship between our customers and stores.  In the example workflow below I have added data files that contain my store addresses and my customer addresses and have added the Street Geocoder to both data streams: -

 

Step1.png 

 

 The Browse tools show me the postion of my customers and my stores: -

 

Browse.png

 

In my examples above, I am using the default CloudMade map viewer; if you have the Spatial Data Bundle then you can view your data using the Tom Tom maps.

 

Once I have the locations of my customers and stores, I want to understand where my customers are in relation to my stores.  I may wish to open a new store if customers have too far to travel or alternatively maybe I need to close down a store and want to understand which one has the least customers.  To do this, the first thing I will do is add a Trade Area Tool to my workflow and set a 5 mile radius around each store: -

 

Step2.png

 

The Browse Tool now shows me my store trade areas: -

 

Browse2.png

 

What I can now see is that I have two stores at the bottom which overlap slightly but also that I have four stores in the centre that are all in close proximity to each other.  That said, this is the City centre so perhaps not unexpected.

 

Let's now see which customers fall within these trade areas, to do this I will add a Spatial Match Tool and join both my customer and store data: -

 

Step3.png

 

My customer data is attached to the Target (T) connector and my store trade area data is attached to the Universe (U) connector.  The results show me which customers match to a trade area and those that do not: -

 

Browse3.png

 

The results show me that there are 6,977 customers within a 5 mile radius of a store but there are 544 customers not covered by any of the stores.  I now have this additional insight into my data and can make a decision about which stores to close or maybe open new stores.

 

Finally, I mentioned earlier in the article about how we can take co-ordinate values from a Google Map URL and use this data to create a spatial object.  To do this I can use the Create Points tool.  From the screen shot I showed earlier, we can simply copy the latitiude and longitude values (51.3643201,0.5392203) and place these into a text input tool: -

 

Step4.png

 

Finally I add a Create Points tool and select my co-ordinate fields: -

 

Step5.png

 

The Browse Tool shows me my location below: -

 

Browse4.png

 

Hopefully what I have covered here gives you a good understanding of the basics of working with Spatial Data in Alteryx and gives you inspiration to try them out if you've not used them before.  If you're looking for further examples then please do check out the Product Training section of the Alteryx website.

 

Thanks!

Comments
ACE Emeritus
ACE Emeritus

Bravo Andy!

Alteryx Partner

Very useful thx

Meteoroid

Great Intro

Meteor
Great Article!!
Labels