rl_threats | R Documentation |
Return a list of the latest assessments which are subject to a specific threat (e.g., energy production and mining, climate change, and severe weather). This will only return assessments for the threat code specified. You will need to do additional requests for sub-threats (e.g., a request for threat code 2_1 will need additional requests for codes 2_1_1, 2_1_2, etc.).
rl_threats(
code = NULL,
key = NULL,
parse = TRUE,
all = TRUE,
page = 1,
quiet = FALSE,
...
)
rl_threats_(code = NULL, key = NULL, all = TRUE, page = 1, quiet = FALSE, ...)
code |
(character) The code of the threat to look up. If not supplied, a list of all threats 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 threat details:
rl_categories()
,
rl_pop_trends()
,
rl_stresses()
,
rl_use_and_trade()
## Not run:
# Get all threats
rl_threats()
# Get assessment summary for intentional hunting and trapping
rl_threats("5_1_1")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.