This function downloads protected areas for one country using the WDPA API.
get_wdpa(isocode, path = "wdpa", key = "WDPA_KEY")
a character specifying the ISO-3 code of the country
the path (directory) to save spatial dataset (
a character providing the WDPA token name stored in the
sf object (GEOMETRY) of protected areas defined in the
EPSG 4326 with the following 19 attributes:
the ID of the protected area on the WDPA database
the name of the protected area on the WDPA database
the original name of the protected area
the ISO-3 code of the country
the name of the country
the owner of the protected area
TRUE for marine and
FALSE for terrestrial
the designation of the protected area
the IUCN category
the no take status
the (reported) area of the protected area
the (reported) area of the marine part of the protected area
the (reported) area of the no take part of the protected area
the legal status of the protected area
the management authority
the type of gouvernance
the URL of the management plan
the URL of the protected area page on the Protected Planet website
the date of the last update of the legal status
Spatial data are also written on the hard drive in the folder
path as a
geopackage. Filename is structured as XXX_protectedareas.gpkg (where
XXX is the ISO-3 code of the country). If the
path folder does not exist
it will created relatively to the current directory.
Note that some geometries are POINTS not (MULTIPOLYGONS).
1 2 3 4 5 6 7 8 9 10 11 12 13
## Not run: ## Get the ISO-3 code of Georgia ---- data("wdpa_countries", package = "worldpa") wdpa_countries[grep("Georgia", wdpa_countries$"country_name"), 3:4] ## country_name country_iso3 ## 133 Georgia GEO ## 235 South Georgia and the South Sandwich Islands SGS ## Download Protected Areas for Georgia ---- worldpa::get_wdpa(isocode = "GEO", path = file.path("data", "wdpa")) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.