wdpa_api_pa: WDPA API: protected areas

View source: R/wdpa_api_pa.R

wdpa_api_paR Documentation

WDPA API: protected areas

Description

WDPA API: protected areas

Usage

wdpa_api_pa(wdpa_id = NULL, geojson = FALSE, page = 1, per_page = 25,
  token = NULL, ...)

Arguments

wdpa_id

(character) WDPA protected area 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_pa(per_page = 1)
(x <- wdpa_api_pa(per_page = 1, geojson = TRUE))
x$geojson
wdpa_api_pa(per_page = 3, page = 2)
wdpa_api_pa(wdpa_id = 322152)
(x <- wdpa_api_pa(wdpa_id = 322152, geojson = TRUE))
x$geojson

## End(Not run)

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