wdpa_api_countries: WDPA API: countries

View source: R/wdpa_api_countries.R

wdpa_api_countriesR Documentation

WDPA API: countries

Description

WDPA API: countries

Usage

wdpa_api_countries(country_code = NULL, geojson = FALSE, page = 1,
  per_page = 25, token = NULL, ...)

Arguments

country_code

(character) ISO3 country code ID

geojson

(logical) If TRUE returns the GeoJSON representation of the geometry of the protected areas. Default: FALSE

page

(integer) page to retrieve. Default: 1

per_page

(character) results to retrieve per page. Default: 25

token

(character) token. see rwdpa for help on tokens

...

curl options passed on to crul::HttpClient

Details

This function uses the Protected Planet API

References

https://api.protectedplanet.net/documentation

Examples

## Not run: 
wdpa_api_countries(per_page = 1)
(x <- wdpa_api_countries(per_page = 1, geojson = TRUE))
x$geojson
wdpa_api_countries()
wdpa_api_countries(per_page = 3, page = 2)
wdpa_api_countries(country_code = 'BEN')
wdpa_api_countries(country_code = 'BEN', geojson = TRUE)

## End(Not run)

ropenscilabs/rwdpa documentation built on May 18, 2022, 8:31 p.m.