DGVMTools v1.1.0 release (2023-12-15)
The primary purpose of this release is to ditch the dependencies on removed or deprecated functionality from other packages. In particular the dropping of the maps
, maptools
and mapdata
packages and replacing them with rnaturalearth
and rnaturalearthdata
. There are other bugfixes and changes, see below.
Modernization
- The
maps
,maptools
andmapdata
packages have been replaced withrnaturalearth
andrnaturalearthdata
(also removing the dependency onrgeos
) for building country and continental outlines. The options available for themap.overlay
argument are now "world", "countries" or "ne_countries" for full country outlines (all equivalent) or "coastlines" or "ne_coastlines" for coastlines only (both equivalent). Note these packages also have lots of other nice things what you can put on your plots (usingsf
andggplot2
) - In a similar vein,
selectGridcells()
(and thereforegetField()
) can now read takesf
objects (but no longermaps
) objects. SpatRast
objects fromterra
are now handled without conversion toraster
.raster
andsp
are still used in the package but only for exporting objects of those packages. Overall, the functionality ofDGVMTools
doesn't depend onsp
orraster
any more, so they can be easily deprecated and removed in future releases.- Plotting arguments are more consistent with
ggplot2
, withlinewidth
replacingsize
forgeom_line
(in accordance with theggplot2
deprecation) - Usage of the deprecated
aes_string()
function has been removed (behind the scenes only)
Breaking changes
- The
map.overlay
argument now takes strings based onrnaturalearth
rather thanmaps
(see above). selectGridcels()
now takessf
objects instead ofmaps
objects. Thernaturalearth
package is a good place to get country outlines to use here, it is a great replacement formaps
.- The
plotSubannual()
function now has argumentssize
andlinewidth
instead ofpoint.size
andline.width
respectively.
Other improvements
- Can now specify lons and lats to function addArea() which is useful for area calculations in sparse grids.
Bugfixes
- Argument
text.multiplier
now handled properly inplotSubannual()
. Thanks Drew! - Bugfix when first.year/last.year is NULL
- Bugfix in
plotSubannual()
to use the specified summary function and not always the mean.