is it possible to merge datasets in R by longitude and latitude?
I am seeking to merge two geocoded datasets by AidData, containing information on development projects all around the globe. I would like to connect projects which are within a radius of 50km of a project from the other dataset. Columns in the dataframes look something like this:
Dataframe place_name latitude longitude
World Bank Dar es Salaam -6.82349 39.26951
China Dar es Salaam Region -6.83522 39.19597
The most problematic issue is that a 50km radius is not equating to a specific, non-varying change in latitude or longitude everywhere. If that would be the case, the problem could be resolved rather easily by setting an upper and lower boundary for each project, and merging it with each other projects that falls within those boundaries.
Is it possible to merge these data by latitude and longitude in R at all?