I'm building a transition matrix of land use change (state) over the years.
I'm therefore comparing shapefile years after years and build a dataframe with:
Landuse year1 - Landuse year2 - ....- ID- centroid
with the following function :
full_join(landuse1, landuse2, by="centroid")
where centroid is the actual centroid of the polygons. A centroid, is basically a vector of two numeric value.
However, the centroid, year after year, can slitghly shift (because the polygon actually change a little bit) leading in incomplete data gathering through the full_join
function because centroid must exactly match.
I'd like to include a "more or less" argument, so that that any centroid close enough to the one from the year before can be joined to the datagrame for that particular polygon. But I'm not sure how ?
Thank you in advance.