Skip to contents

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.

Usage

splnr_get_MPAs(
  PlanUnits,
  Countries,
  Status = c("Designated", "Established", "Inscribed"),
  Desig = c("National", "Regional", "International", "Not Applicable"),
  Category = c("Ia", "Ib", "II", "III", "IV"),
  ...
)

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()

Value

A sf object with the MPAs intersected with the planning units

Examples

dat <- splnr_get_MPAs(PlanUnits = dat_PUs, Countries = "Australia")
#> Warning: GDAL Message 1: organizePolygons() received a polygon with more than 100 parts. The processing may be really slow.  You can skip the processing by setting METHOD=SKIP, or only make it analyze counter-clock wise parts by setting METHOD=ONLY_CCW if you can assume that the outline of holes is counter-clock wise defined
#> Linking to GEOS 3.13.0, GDAL 3.8.5, PROJ 9.5.1; 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")