I have a question with regard to spatial aggregation in R. My dataset has latitude/longitude coordinates some close to each other and some are not. I want to make one point for the latitude/longitude coordinates that are close to each other.
I am unsure how to do this. Do I list the latitude/longitude coordinates as groups and make find the mean to make one point represent each group? As I have little experience with this sort of stuff. I was hoping anyone of you might have some useful guidance/a possible solution.
Time Received Speed Latitude Longitude
1.47917E+12 1.5 38.9295887 -77.2478945
1.47917E+12 1 38.9295048 -77.247922
1.47917E+12 3 38.9294865 -77.2479055
1.47917E+12 5 38.9294865 -77.2479055
1.47917E+12 2 38.9294771 -77.2478712
1.47917E+12 2 38.9294772 -77.2478712
1.47917E+12 1.5 38.9294771 -77.2477417
1.47917E+12 1.5 38.9294771 -77.2477417
For example if I can make the latitude/longitude coordinates below as one point:
38.9294771 -77.2478712
38.9294772 -77.2478712
38.9294771 -77.2477417
38.9294771 -77.2477417
Will be for example like below without effecting the Time,and Speed values:
38.9294771 -77.24774117