This is a two-fold question...
First, I'm brand new to spatial tools so I'm wondering if there's a cleaner/easier way to accomplish what I have in the attached workflow.
The gist is, for each of my customer stores, what is the nearest competitor in the whole market (ROM) and what is the nearest store for each other competitor.
So I end up with something like this (completely made up, but practical data is in workflow):
| Str # | Nearest ROM | Nearest Comp A | Nearest Comp B | Nearest Comp C | Nearest Comp D |
| CustA_001 | CustC_005 | N/A | CustB_011 | CustC_005 | CustD_002 |
| CustB_003 | CustD_007 | CustA_031 | N/A | CustC_042 | CustD_007 |
But given that I'm comparing every single store to every other single store five times, it gets messy...
Second, I'm trying to think of a way to structure the output so that I can plot these relationships on a Tableau map. I'd like to be able to choose a customer and/or a region, and then also plot the nearest ROM, Comp A, Comp B, etc. I'm thinking of a filter so I can select any combination of the competitors. Do I need to stack my results so that the data is "long" - more like this?
| Str # | Nearest Comp | Comp Str # |
| CustA_001 | ROM | CustC_005 |
| CustA_001 | CustB | CustB_011 |
| CustA_001 | CustC | CustC_005 |
| CustA_001 | CustD | CustD_002 |
| CustB_003 | ROM | CustD_007 |
| CustB_003 | CustA | CustA_031 |
| CustB_003 | CustA | CustA_031 |
| CustB_003 | CustC | CustC_042 |
| CustB_003 | CustD | CustD_007 |
Can't quite wrap my head around the best way to prep the data...