This code is a wrapper for the wonderful wdpar
package written by Jeffrey O. Hanson. This data is then interfaced with the planning units.
An sf
object is returned with the PU area covered by the selected marine protected areas.
Arguments
- PlanUnits
Planning Units as an
sf
object- Countries
A character vector of the countries for which to extract MPAs. To get all MPAs, use
"global"
here.- Status
The status field in the WDPA provides information on whether a protected area has been established, designated, or proposed at the time the data was submitted.
- Desig
The designation type is the category or type of protected area as legally/officially designated or proposed.
- Category
Stores the IUCN Protected Area Management Categories (recorded in field IUCN_CAT) for each of the protected areas where these categories are reported
- ...
Other arguments passed to
wdpa_fetch()
Examples
dat <- splnr_get_MPAs(PlanUnits = dat_PUs, Countries = "Australia")
#> ! importing local data (version Apr 2024); use "force=TRUE" if you need latest version.
#> Warning: package ‘sf’ was built under R version 4.4.1
#> Linking to GEOS 3.11.0, GDAL 3.5.3, PROJ 9.1.0; sf_use_s2() is TRUE
#> Warning: attribute variables are assumed to be spatially constant throughout all geometries
#> Warning: attribute variables are assumed to be spatially constant throughout all geometries
aust <- rnaturalearth::ne_countries(country = "Australia", returnclass = "sf")
gg <- ggplot2::ggplot() +
ggplot2::geom_sf(data = dat, ggplot2::aes(fill = wdpa)) +
ggplot2::geom_sf(data = aust, fill = "grey50")