Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Find States that Border Each Other

VizChic
11 - Bolide

Hey Folks,

 

I'm messing around with a pretty simple dataset for one of the makeover monday's published by Andy Kriebel.  I was curious to see if there was a way in Alteryx that I can generate something that shows neighbouring states in the United States.  Eg Florida has Alabama and Georgia as neighbours - so my output table would look something like

StateNeighbours
FloridaAlabama, Georgia

 

If it's not possible in Alteryx, I have found another way.. but just looking to improve my alteryx toolbox :)

 

Cheers

Fi

6 REPLIES 6
jdunkerley79
ACE Emeritus
ACE Emeritus

Hi Fi,

 

Yep possible.

 

I am far from an expert on spatial stuff but here is my go.

 

First needed state polygons. Google have KML ones here: https://www.google.com/fusiontables/DataSource?docid=1-v6i33Lf_FjhRZcHKO0PG2DADipCg4L-dGiucAE

I downloaded it as a CSV then used RegEx tool to convert into a set of points

Then the spatial tools to create points and the polyline build

Finally use a spatial match to look for boundaries and select the unique boundaries.

 

2016-07-18_11-13-54.jpg

 

Sample attached

 

RussellD
Alteryx Alumni (Retired)

I differed slightly but came up with nearly the same answer. If you need a data set, Alteryx provides some spatial from US Census & USGS here.  I used the US Census for my source.

 

7-18-2016 11-17-53 AM.jpg

 

The main difference was that I'm using only touches. I did this because of the way the spatial data was built. In this case it works since all the border are coincident and not overlapping.  The rest is just to clean up for the output. The summarize uses a groupby on the state and concatenates the neighbours together.

 

 

VizChic
11 - Bolide

Hi Guys,

 

thanks for taking the time out to reply and provide me with two answers!  Unfortunately I am on a work computer that's locked down and we have alteryx 10.1 installed. Looks like I'll have to kick off a request to upgrade which will take about 6-8 weeks :( 

 

I'll try to look at your workflows to see if I can generate something.. and maybe ask questions along the way if I get stuck.

 

Cheers

Fi

jdunkerley79
ACE Emeritus
ACE Emeritus

Have attached mine as a 10.0 workflow so you can see.

 

Didnt know about the spatial data Alteryx provided which saves the KML parsing and using intersects as overlapped missed!

 

 

VizChic
11 - Bolide

Thank you for taking the time out to help me again!  The solution worked :-) When I get around to finally writing a blog about my makeover monday are you ok if I reference the great work you did on this?

jdunkerley79
ACE Emeritus
ACE Emeritus

Of course.

Labels