Alteryx Designer Desktop Discussions

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

Distance Matrix

Linus_Genscher
5 - Atom

Hi,

I have a Data Set that includes zip code, X and Y coordinates and want to make a Matrix, that shows the distance between the zipcodes.

Can somebody help me with this?

5 REPLIES 5
griffinwelsh
11 - Bolide

Assuming you have the border coordinates for the zip codes you will need to use the create points to create a spatial object for each point. Then use the poly build tool to create a spatial object for the area of each zipcode. Finally you can use the find nearest tool to find the x number of closest zip codes (you can set the max number of results and max distance to be very high). If you provide the data set I can provide you a sample workflow.

danilang
19 - Altair
19 - Altair

Hi @Linus_Genscher 

 

In order to do this, you need some way to map zip codes to lat/lon values.  Alteryx sells a geocoder dataset and you can probably get the info from other sources.  Once you have the lat/lon values you convert them to geo points, using the Create Points tool and then use a Distance tool to find the distances between them.  

 

The Spatial Analytics interactive videos are a good place to started on this.

 

Dan

 

 

Linus_Genscher
5 - Atom

here's the data

 

Linus_Genscher
5 - Atom

griffinwelsh

here is the date

Qiu
21 - Polaris
21 - Polaris

@Linus_Genscher 
With the data you provided, I have made a quick sample flow.

we use the Append and CrossTab tool to make the Matrix.

0619-Linus_Genscher.png

Labels