Hello Everyone!
I have lat and lon for each row and another column for admits. For each row, I am aiming to sum all other row admissions that fall within a geographic range (either driving or miles - ~35 miles) of the current row (and repeat for each row onward).
Any help here would be greatly appreciated - thanks!
Hi @aspell12 - sample data would help.
Thanks, here's a refined sample of the full data set. For each location, I'd like to sum up all other locations' admissions if they are within ~35 miles of the row's location.
For instance, if location 2 and 3 are within 35 miles of location 1, the corresponding new column entry for location 1 would be 145. And the same calculation would be applied for all rows (e.g. if location 1 is the only one in range for location 5, that new column entry would be 50 and so on).
Appreciate any help / advice here!
Location | Lat | Lon | Admissions |
1 | -41.23 | -73.46 | 50 |
2 | -##.## | -##.## | 75 |
3 | -##.## | -##.## | 60 |
4 | -##.## | -##.## | 45 |
5 | -##.## | -##.## | 32 |