Free Trial

Alteryx Designer Desktop Discussions

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

Alter Longitude / Latitude to Increase Distance Between Centroids

bertal34
9 - Comet

Background: Large retail company with many stores throughout the US.  Sometimes 2-4 stores are in close proximity to each other, like in shopping malls.  Alteryx is used to generate the centroid of each store, based on longitude/latitude.  This data is used in Tableau to generate maps.

 

Issue:  Stores in close proximity to each other have overlapping marks in Tableau, making it appear as 1 store instead of 2-4 stores.  In most cases, cannot tell it's multiple stores unless zooming in extremely close, which is not a solution.

 

Possible Solution: I'm able to identify which stores are in close proximity to each other.  My thinking is that I can manually provide separation by altering the longitude / latitude of these stores.  I have provided an example with 4 stores close to each other.  If I could figure out how to loop through them and move the northern most store (max latitude) further north, the southern most store (min latitude) further south, the eastern most store further east, the western most store further west.  This is the part I'm having trouble coming up with a solution for.

 

I have attached example data of 4 "overlapping" stores along with screenshots of how 4 stores can appear as 1.

11 REPLIES 11
Claje
14 - Magnetar

Hi,

 

The reason why extra fields are deselected is because in the macro "claje_iterdirections", the last Join tool (ID 41) has "Unknown" fields deselected.  I deselected this early on in my process, but it really could be enabled.

This was disabled because iterative macros like it when fields stay exactly the same between iterations, but the SELECT tools right before the final output already deselect all of my "working" fields, so it should work just fine.

 

If you have trouble finding this spot let me know and I can try and send some more details.

bertal34
9 - Comet

Perfect, thanks again for your help on this.  Amazing!

Labels
Top Solution Authors