Alteryx Designer Desktop Discussions

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

Spatial Beginner

cstafford
8 - Asteroid

I am new with using the Spatial tools and I do not have the add on package. However, with the standard package, is it possible to find all the zip codes within a mile radius of a given zip code. I currently use a website to determine this, but figured I try to expand my knowledge using the Spatial tool within Alteryx. I

3 REPLIES 3
Harbinger
9 - Comet

if you have spatial objects for both, it is possible to do this out of the box! 

CharlieS
17 - Castor
17 - Castor

Hi @cstafford 


The basic spatial tools are included with Designer so you should be all set for the analysis you described. FYI the spatial add-on data gives you geocoding and drive time calculation data.

 

So like @Harbinger mentioned, let's start by obtaining a set of "ZIP" polygons into Alteryx. Sidenote, technically ZIP codes aren't built as polygons, so there's a LOT of discrepancy between ZIP code polygon sets. In spatial analysis, the set most often recommended is the ZCTA (ZIP Code Tabulation Area) polygons from the Census Bureau. They have the added bonus of being free. Here's a link to download them:

 

TIGER/Line files from the Census Bureau: https://www.census.gov/geographies/mapping-files/time-series/geo/tiger-line-file.html 

FTP location: https://www2.census.gov/geo/tiger/TIGER2020/ZCTA5/ 

 

- Download the .zip file

- Extract it.

- From Designer, open the Shapefile (.shp) from the extracted folder

- Boom! You've got ZIP code polygons in Alteryx. 

- Bonus step: Save just the ZIP Code (ZCTA5CE10) and spatial object (SpatialObj) fields as a .yxdb file so it's easier to work with in the future. 

 

Now, onto the analysis. There are many ways to do this with the spatial tools, so I'll start with one and we can explore others if you'd like. 

 

- Identify the polygon you'd like to study ("given zip code" below). This will be the Target of your Spatial Match tool. 

- Use the buffer tool to add a 1 mile buffer around that polygon.

- Match the rest of the zip codes (the Universe Input on your Spatial Match tool) to that new buffed polygon. 

- The "M" or matched output of the Spatial Match tool is your results. 

 

20210311-ZCTAMatch1.JPG

 

In the attached example, I saved a selection of records from the ZCTA file and show the steps above. Let me know if you have any questions. 

cstafford
8 - Asteroid

Awesome. I will give this a shot. Thank you!!

Labels