# view all point locations colored by measurement year using mapview
tbl_regmat_target%>%
# convert to simple feature (SF) object with geometry type POINT, a spatial object
st_as_sf(.,coords=c("X","Y"),crs="EPSG:28992")%>%
st_jitter(.,factor=0.00001)%>%# so we can see samples from same location
mapview(.,
zcol=TARGET,
layer.name=TARGET,
col.regions=magma(n=1000),
legend=TRUE,
viewer.suppress=FALSE)
# what differences do you see between the original and updated maps of peat classes?
# Dynamic covariates: land use (LU) ---------------------------------------
# Date of data used to make each national LU map (LGN),
# see https://www.wur.nl/nl/Onderzoek-Resultaten/Onderzoeksinstituten/Environmental-Research/Faciliteiten-tools/Kaarten-en-GIS-bestanden/Landelijk-Grondgebruik-Nederland/Versies-bestanden.htm
# LGN1: 1984-1987
# LGN2: 1990-1994
# LGN3: 1995-1997
# LGN4: 1999-2000
# LGN5: 2003-2004
# LGN6: 2007-2008
# LGN7: 2012
# LGN2018: 2018
# LGN2019: 2019
# LGN2020: 2020
# LGN2021: 2021
# Historic LU maps (HGN) reconstructed for specific year (+/- 5 years) using old maps
# HGN1900: 1900
# HGN1960: 1960
# HGN1970: 1970
# HGN1980: 1980
# HGN1990: 1990
# To create dynamic LU covariates, first create temporary cols of
# a) LU for each year at sampling location (all the way back to LU 40 yrs
# before first year we predict for (see delta40 below), i.e. 1950 - 40 = 1910
# b) using a, we can then make cols for LU at each sampling location t-1 all