Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello, how are you?
I have a list of shops with their corresponding latitude and longitude values (in a decimal format) and I'd like to calculate the amount of shops in the same city located within 1 kilometer for each one of them. I've managed to do this in Excel in a very homemade and manual way but I need to automate it to be able to work with bigger data.
The list contains the following fields:
Shop name Shop ID LATITUDE LONGITUDE
Basically, I'd like to know for every shop what the 'shop density' around it is. Distances between the elements aren't too big, so the Pythagorean distance formula will do.
Any kind of help is appreciated.
Thank you.
See this post: Re: distance between two coordinates
Or maybe this one: WGS84 Compliant Great Circle Distance Calculation
Thank you very much. I modified the first one and it worked just fine. I created the following expression which displayed the "shop density" for each shop:
sum(if(Distance<[insert distance in kilometers],1,0))