Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Heat map using spatial tools

sd
7 - Meteor

Hi,

 

I'm trying to use Alteryx to create a heat map in Tableau.  (I'm using Altyerx version 10.1.7.12188)  I'm shooting for something like the visuals shown in Chris Love's 'The Information Lab' blog.  http://www.theinformationlab.co.uk/2014/12/03/geospatial-heat-maps-tableau-via-alteryx/

 

My source file has two columns, 1) US zip code and 2) frequency.  To start simple, I'm using the Tableau Sample-Superstore Excel dataset which has zip codes and I can add a count to get a frequency.  First off, to convert a zip code to latitude and longitude, do I understand correctly that I need to download another app (Alyterx Public Geocoding App) to use in conjunction with Alteryx - as outlined in the following post?  http://community.alteryx.com/t5/Engine-Works-Blog/Alteryx-Public-Geocoder/ba-p/2099

 

I have not had success with the above post.  Is anyone aware of a 'how to' for using Alteryx for converting zip codes to latitude and longitude?   Or if that is not available, are there any suggestions for how I can get started on the path to creating the heat map in Tableau that I described above?

 

Any assistance is appreciated!

 

Stuart

8 REPLIES 8
Philip
12 - Quasar

As long as you're aware of the caveats and limitations of working with zip codes (see On the use of ZIP codes and ZIP code tabulation areas (ZCTAs) for the spatial analysis of epidemiolo... as an example), the way I've handled the situation is to get a zip code boundary file, then convert it to polygon centroid using the Spaital Info tool.

 

From what I understood in your link above, the GeoCoding talked about is for converting an address to latitude/longitude. This is a finer spatial representation than the zip code.

 

Another question I'd ask is how large an area you will be representing? If it's the entire US, and if you have county informaiton, I'd use that. The boundaries are trustworthy and well-established (unlike zip codes), and the level of detail would be more conducive for the display of such a large geographic area.

sd
7 - Meteor

Philip,

 

Thank you for your reply and for the link regarding the use of zip codes for spatial analysis.

 

First off, to answer your question on the area I will be representing...  I will be showing the entire United States.  I actually do have county information, however I would rather use this as a last resort.

 

I've also played around with using the ploygon centroid of the zip code and Tableau has ways of doing that, I just don't know use Alteryx to take my zip code level data and find the polygon centroid.  It sounds like I need to use the Spatial tools to do this? 

 

Is there a way to take a file of zip codes in Alteryx and find the polygon centroid? 

 

Stuart

Philip
12 - Quasar

Yes, it's the Spaital Info tool under the Spatial tab. You need a zip code shapefile to join and get the zip code polygons. Then you'd want "Centroid as Spatial Obj" to create a point object, or "Centroid as X and Y fields" if you want the latitude and longitude added as fields to the data set.

sd
7 - Meteor

Philip,

 

Thank you again for your reply.  I've tried the spatial info tool with my zip code file.  (Below you referenced a 'zip code shapefile', I'm not sure if this means a special type of file, or if it's just refering to the zip codes that I want to convert to ploygon shapes? - so that might be part of my problem.  I just used my zip code file.)

 

Below is a screenshot of what I'm attempting.  Does your reference below to a 'zip code shapefile' simply mean my file with zip codes?  Or is there some other way I need to convert my zip code file to a zip code shapefile?  What I did below does not work, it returns Nulls for the Centroid, CentroidX and CentroidY fields.

 

Stuart

 

Alteryx Zip to Polygon.png

sd
7 - Meteor

Just to follow up on Philip's reference to the 'zip code shapefile' ... is anyone aware if this is a standard file that has just zip code information?  Or is it a zip code file that has been transformed in some way?

 

If it's the former, it narrows down my issue to learning how to use the spatial info tool in Alteryx.  If it's the latter, I'm hoping someone can share some insight on how to create a zip code shapefile.

 

Thanks,

Stuart

Philip
12 - Quasar

You can get a zip code shapefile from the US Census:

https://www.census.gov/geo/maps-data/data/cbf/cbf_zcta.html

 

When you unzip it, there will be a .shp that goes into your input tool, but you need all those files to make the file useful.

 

I've included an example of what to do once it's unzipped.

 

Let me know if you have additional questions or something doesn't make sense to you.

tom_montpool
12 - Quasar

Just a "head's-up" that ZCTA from the Census are not the same as USPS ZIP Codes.

 

If you have access to the Experian data (in the Demographic Analysis tools) you can get the ZIP boundaries from the Allocate Input tool.

 

 

sd
7 - Meteor

Philip,

 

Thank you for the example!

Labels