Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Free Trial

Alteryx Designer Desktop Discussions

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

Find Nearest Oddity

PhilipMannering
16 - Nebula
16 - Nebula

Hey All,

 

I've found weird behavior in the Find Nearest Tool.

 

 

If I look for the two nearest points, I get,

PhilipMannering_0-1683237127353.png

And so, if I look for the 1 nearest I would expect to see Suzuka Circuit. However, I instead see Autodromo Jose Carlos Pace,

PhilipMannering_1-1683237191037.png

 

Can anybody help explain what's going on? Workflow attached.

 

3 REPLIES 3
danilang
19 - Altair
19 - Altair

Hi @PhilipMannering 

 

It appears to be a limitation of the find nearest algorithm.  If you include the direction as an output you see that the direction LV->Suzuka is listed as East where it should be West.  Probably related to crossing the International Date Line.

danilang_3-1683294345430.png

I added in the site of the Montreal Grand Prix as another site where you'd obviously travel east to get to as well as Saugus Speedway outside of LA as another site to the west.  Finding the nearest 3 then gives

 

danilang_4-1683294433288.png

 

My best guess is that the algorithm uses the direction in some obscure way and hiccups when crossing the IDL.  Maybe a question for the R gurus at Alteryx

 

Dan

 

 

DataNath
17 - Castor
17 - Castor

Was wondering what was going on with the various Weekly Challenge submissions this week! When I had a peak at a few that got the lower kilometer coverage, none had used Find Nearest. As @danilang suggests, when I plotted mine, it doesn't wrap around the date line as expected but bounces back within the view:

 

DataNath_0-1683295039937.png

PhilipMannering
16 - Nebula
16 - Nebula

@danilang and @DataNath . But it does give the correct distance as an output. Just doesn't seem to use that distance when getting the nth nearest points. Guess I should be using Append Fields → Distance Tools in my iterative macro ¯\_(ツ)_/¯

Labels
Top Solution Authors