rl_countries | R Documentation |
Returns a collection of assessments for a given country code.
rl_countries(
code = NULL,
key = NULL,
parse = TRUE,
all = TRUE,
page = 1,
quiet = FALSE,
...
)
rl_countries_(
code = NULL,
key = NULL,
all = TRUE,
page = 1,
quiet = FALSE,
...
)
code |
(character) The ISO alpha-2 code of the country to look up. If not supplied, a list of all countries will be returned. |
key |
(character) An IUCN API token. See |
parse |
(logical) Whether to parse the output to list ( |
all |
(logical) Whether to retrieve all results at once or not. If
|
page |
(integer/numeric) Page to get if |
quiet |
(logical) Whether to suppress progress for multi-page downloads
or not. Default: |
... |
Includes the following filters that are supported by the API endpoint (refer to the API docs for more information):
Also includes the following arguments related to the wait time between request retries if a "Too Many Requests" error is received from the API (see HttpClient()$retry() for more details):
Also supports any curl options passed to the GET request via HttpClient. |
A list unless using a function with a trailing underscore, in which case json as character string is returned.
API docs at https://api.iucnredlist.org/.
Assessments by geographic regions:
rl_faos()
,
rl_realms()
,
rl_scopes()
## Not run:
# Get list of all countries
rl_countries()
# Get assessments for Madagascar
rl_countries("MG")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.