Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
Check out our powerful new search update! You can read more here. Please let us know if you have any feedback by creating a topic here.
SOLVED

Find States that Border Each Other

Highlighted
Meteor
Meteor

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

Highlighted

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

 

Highlighted
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.

 

 

Highlighted
Meteor
Meteor

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

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!

 

 

Highlighted
Meteor
Meteor

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?

Highlighted

Of course.

Labels