I'm trying to figure out a way to assign GPS coordinates to core GPS values.
I've got tons of store locations (with long & lat coordinates) and I'd like to group them to one of x core GPS groups (cities).
I know how to perform a k-means cluster analysis and let the algorithm identify the clusters itself, but in this case I know how many groups I need and where I'd like their centers to be.
Is there a way I can use the K-NN algorithm to automatically associate GPS coordinates to group centers defined by the user?
PS. I currently program in Stata, but if this task is easier in either Python, R, or SAS, please feel free to post how.