ropensci / rnaturalearth

An R package to hold and facilitate interaction with natural earth map data :earth_africa:
http://ropensci.github.io/rnaturalearth/
Other
214 stars 24 forks source link

Breaking changes induced when using data from Natural Earth 4.1 #69

Closed PMassicotte closed 1 year ago

PMassicotte commented 1 year ago

This is breaking reverse dependencies (when switched to Natural Earth v4.1, https://www.naturalearthdata.com/blog/miscellaneous/natural-earth-v4-1-0-release-notes/)

Before switching to Natural Earth 4.1:

# https://github.com/ropensci/rnaturalearth/commit/3063a52bd76dada68e0873d49f0b79babfbd01dc

pak::pkg_install("ropensci/rnaturalearth@3063a52bd76dada68e0873d49f0b79babfbd01dc", ask = FALSE)

rnaturalearth::ne_countries(scale = "small", returnclass = "sf")[1]

r$> rnaturalearth::ne_countries(scale = "small", returnclass = "sf")[1]
Simple feature collection with 177 features and 1 field
Geometry type: MULTIPOLYGON
Dimension:     XY
Bounding box:  xmin: -180 ymin: -90 xmax: 180 ymax: 83.64513
CRS:           +proj=longlat +datum=WGS84 +no_defs +ellps=WGS84 +towgs84=0,0,0
First 10 features:
  scalerank                       geometry
0         1 MULTIPOLYGON (((61.21082 35...
1         1 MULTIPOLYGON (((16.32653 -5...
2         1 MULTIPOLYGON (((20.59025 41...
3         1 MULTIPOLYGON (((51.57952 24...
4         1 MULTIPOLYGON (((-65.5 -55.2...
5         1 MULTIPOLYGON (((43.58275 41...
6         1 MULTIPOLYGON (((-59.57209 -...
7         3 MULTIPOLYGON (((68.935 -48....
8         1 MULTIPOLYGON (((145.398 -40...
9         1 MULTIPOLYGON (((16.97967 48...

After switching to Natural Earth 4.1:

# https://github.com/ropensci/rnaturalearth/commit/bfeb7ceb6e6539c152b2114dfae4b96d9accc3c3

pak::pkg_install("ropensci/rnaturalearth@bfeb7ceb6e6539c152b2114dfae4b96d9accc3c3", ask = FALSE)

rnaturalearth::ne_countries(scale = "small", returnclass = "sf")[1]

r$> rnaturalearth::ne_countries(scale = "small", returnclass = "sf")[1]
Simple feature collection with 177 features and 1 field
Geometry type: MULTIPOLYGON
Dimension:     XY
Bounding box:  xmin: -180 ymin: -90 xmax: 180 ymax: 83.64513
CRS:           +proj=longlat +datum=WGS84 +no_defs +ellps=WGS84 +towgs84=0,0,0
First 10 features:
       featurecla                       geometry
0 Admin-0 country MULTIPOLYGON (((180 -16.067...
1 Admin-0 country MULTIPOLYGON (((33.90371 -0...
2 Admin-0 country MULTIPOLYGON (((-8.66559 27...
3 Admin-0 country MULTIPOLYGON (((-122.84 49,...
4 Admin-0 country MULTIPOLYGON (((-122.84 49,...
5 Admin-0 country MULTIPOLYGON (((87.35997 49...
6 Admin-0 country MULTIPOLYGON (((55.96819 41...
7 Admin-0 country MULTIPOLYGON (((141.0002 -2...
8 Admin-0 country MULTIPOLYGON (((141.0002 -2...
9 Admin-0 country MULTIPOLYGON (((-68.63401 -...

This change in data structure breaks some reverse dependencies packages:

https://win-builder.r-project.org/incoming_pretest/rnaturalearth_0.3.2_20230116_105021/reverseDependencies/summary.txt

The two packages fail at building their vignettes because the structure of Natural Earth has changed.

hannahlowens commented 1 year ago

Thanks for the heads-up. I have addressed problem in voluModel, and an update is on its way to CRAN.

PMassicotte commented 1 year ago

Thank you very much @hannahlowens!

PMassicotte commented 1 year ago

Hi @HannaMeyer, have you had a chance to look at this?

HannaMeyer commented 1 year ago

Thanks! It should be fixed in the developer version on Github now. CRAN submission is intended for the next days.