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

Spatial Grouping/Clustering

dtokarz312
8 - Asteroid

Does anyone have any ideas on how to create groups or clusters for spatial points? I have about 1,200 points positioned globally and I need to group the ones that close to each other. The only information in the table is a unique ID and lat/lon coordinates. 

 

I was thinking of creating 20 or 30 mile voronoi rings then combining the spatial trade area to create a single group. Then use Find Nearest to assign points that are within 2 or 3 miles of a trade area. That should help with the stranglers. Problem is in areas where the sites are really dense. Ex NYC. The group can get really large almost cover half the Northeast. 

 

The whole process needs be automated, as new points are added daily. Any ideas? 

 

Best, 

 

Derek 

28 REPLIES 28
SeanAdams
17 - Castor
17 - Castor

Hey Derek,

 

It seems the key here is how you define "close".

What you could do is to define a grid system, and then any grid with more than a certain density, the definition of close is "within 1 mile", and when the density is lower, then use a far broader tolerance (like for Alaska or northern Europe).

From there, you just change the centroid to a trade area using this distance tolerance, and merge overlapping regions together.

 

Give this a bash, and let me know how you get on?

StephenR
Alteryx
Alteryx

The quickest method would be to use the R Predictive Grouping toolset specifically the K-Centroids Cluster Analysis and Append Cluster.  I've attached a sample workflow. 

Regards,
Stephen Ruhl
Principal Customer Support Engineer

SeanAdams
17 - Castor
17 - Castor

Hey @StephenR,

Thank you for posting this response, I really am very excited to see this in action 'cause I've not yet seen the cluster analysis being used!

 

Would it be possible for you to post the data file that you're using too - reason for asking is that I'm dead keen to use your flow as a learning exercise for myself and see how it works?

Thank you - have a good Thursday

 

Sean

StephenR
Alteryx
Alteryx

@SeanAdams I've attached a yxdb version; the original was a layer in a geodatabase.  It's just a test dataset containing 10,000 random points generated by ArcGIS.

 

 

We often use this workflow to group sites that we want to show on several maps zoomed in to clusters.  We build a bounding polygon and use that for the extent in the map report tool.

Regards,
Stephen Ruhl
Principal Customer Support Engineer

SeanAdams
17 - Castor
17 - Castor

Very useful, thank you!

Now you've got me wondering what else we could use this for :-)

SeanAdams
17 - Castor
17 - Castor

Hey @dtokarz312,

 

Happy weekend!

 

Just wanted to check in on this thread to make sure that you'd got to a solution?   If not, is it worth iterating on this thread to get you to a solution?

 

Cheers

Sean

dtokarz312
8 - Asteroid

Yes, I did @SeanAdams. Thanks for the help. I ended up running the K-means and then creating a 30 mile buffer around the centroid of the k-means grouping (Client was demanding 30 mile buffers). Locations that fell outside of the 30 minute buffer were assigned their own cluster. Thanks again for the help. 

jeromecouzy
5 - Atom

Hi,

 

Could you share the result workflow? This is what I'm looking to build as well.

 

Thanks,

Jerome

sriniprad08
11 - Bolide

Hi ,

 

Thank you so much for posting this.  I have close to 2 TB of data with Lat and Long information with Timestamp for every second. something like this for eg in the attached format. So when i plot these points on US map i would like to have cluster points which are close to each other with large cluster having bigger size etc..

 

Please let me know how should i go about this?

 

Thanks in advance,

 

 

 

Labels