Alteryx Designer Desktop Discussions

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

Finding data points in close proximity from two different data sets

shelbybradley
7 - Meteor

Hi, 

 

Straightforward use case here: I am doing a proximity analysis between two sets of data (one small, one large) to find any matching points within a defined proximity (For example, <1 mile)

 

Dataset 1: long/lats of households

Dataset 2: long/lats of hospitals

Goal of analysis: To find the nearest hospital to each household within a defined proximity (1 mile). The proximity element is the most important piece because I want to define which households are near medical coverage, and which are out of proximity.

 

I'm having trouble setting up the correct workflow and interpreting the output to pick out which/if any hospital is within 1 mile of each specific household in the dataset.

 

I've attached the data set here, in separate tabs.

8 REPLIES 8
Qiu
20 - Arcturus
20 - Arcturus

@shelbybradley 
Hope this is not from those certification questions.
I think we do have a similar weekly challenge similar with your question here.

https://community.alteryx.com/t5/Weekly-Challenge/Challenge-184-Closest-Pubs-to-Tobacco-Dock/td-p/47...

BS_THE_ANALYST
14 - Magnetar

@shelbybradley I think I'd approach this with the Find Nearest tool. 

However, just investigating your data. The points seem to be in INTERESTING locations. Unless I'm missing something extremely obvious.

BS_THE_ANALYST_0-1676589899539.png

 

 

BS_THE_ANALYST
14 - Magnetar

@shelbybradley Households:

BS_THE_ANALYST_1-1676590042787.png

 

Hospitals:

BS_THE_ANALYST_2-1676590059922.png

 

The longitudes are |x| <= 180 and the latitudes are |x|=< 90. So upon inspection they look like they could be legit points. Something strange is afloat with that data or I'm missing something obvious .. 

 

 

 

 

shelbybradley
7 - Meteor

Haha, you're not wrong! I'm using an example data set of placeholder long/lats. I'm more interested in the workflow itself and how to interpret the output correctly. For context, I've tried using the find nearest tool in the past and had some issues with understanding each step in the process and how to interpret the "rank" that appears the final output.

 

Can you share your workflow?

BS_THE_ANALYST
14 - Magnetar

Sure @shelbybradley . So a couple of things I'll say about the Find Nearest tool (from my experience). I've highlighted the areas I'd pay attention to below.
1. Maximum Distance. If you don't find any matches, it's likely your maximum distance isn't set high enough. Therefore, nothing will fall in the proximity.
2. How many points? In our case, we have Households on the T anchor 'Target'. This is saying, let's find X amount of closest hospitals to the Households. X is determined by 'How many nearest points to find'.
3. On the results tab you will see, if you selected 2 Nearest points for instance, FindNearestRank 1, 2, 1, 2 etc for each Household. It will find the nearest points (if there are any) and return the corresponding distance. Ranked by shortest distance first.

BS_THE_ANALYST_0-1676590718589.png

Tweaking the nearest points number:

BS_THE_ANALYST_1-1676590976340.png


Hope that helps!

 

 

 

BS_THE_ANALYST
14 - Magnetar

@shelbybradley you can convince yourself with the browse tool. The map can help you piece together how it's working. Highlight a couple of records like I have here, and they will be highlighted on the map. 

I.e. I selected household A (red), and can see the two closest hospitals (green).

BS_THE_ANALYST_2-1676591186157.png

 

 

 

zuelchm
5 - Atom

Any idea if there is a way to have Alteryx state which other centroid is closest? I know you can manually find it by clicking on the Browse Tool Map but was wondering if there is a way to get the find nearest to output that

RogerNorthup
6 - Meteoroid

As long as you have the FindNearestRank field from the Find Nearest Tool, you can filter out the 1 as the closest, then filter out the 2 as the next closest, and so on.

Labels