eurostat
eurostat copied to clipboard
old-style CRS in spatial data.
Spatial data frames in the current CRAN version of eurostat
were seemingly made with an old version of sf
that used a now-deprecated coordinate reference system format:
> library(eurostat)
> library(sf)
> st_crs(eurostat_geodata_60_2016)
old-style crs object detected; please recreate object with a recent sf::st_crs()
This can be fixed by users by reassigning the CRS via st_crs(eurostat_geodata_60_2016) = st_crs(eurostat_geodata_60_2016)
(which also makes a copy in the environment, the original being immutable).
Related SO Question answered here:
https://stackoverflow.com/questions/72609297/r-map-with-eurostat-package/72671067#72671067
> packageVersion("eurostat")
[1] ‘3.7.10’
Thank you for your troubleshooting @barryrowlingson ! It was very helpful in figuring out the problem.
The root cause of the problem here was probably due to the dataset being saved and included a long time ago, the old-style crs warnings disappeared when data was re-downloaded and re-saved.
The "new" version of eurostat_geodata_60_2016 has some interesting new columns: MOUNT_TYPE, URBN_TYPE and COAST_TYPE. I could've dropped them to have 8 columns as the old dataset had, but maybe they will be worth keeping. I will now have to just figure out what these classifications actually mean to include this information to dataset help files... This Stackoverflow-question and its answer implicate that metadata documentation is somewhat lacklustre here: https://opendata.stackexchange.com/questions/19808/what-mount-type-urbn-type-and-coast-type-represents-in-european-nuts-sha