https://github.com/ropensci/rredlist
IUCN Red List API Client
https://github.com/ropensci/rredlist
api-wrapper biodiversity conservation iucn iucn-red-list r r-package rstats taxize
Last synced: 6 months ago
JSON representation
IUCN Red List API Client
- Host: GitHub
- URL: https://github.com/ropensci/rredlist
- Owner: ropensci
- License: other
- Created: 2016-01-22T23:11:17.000Z (over 10 years ago)
- Default Branch: main
- Last Pushed: 2025-09-04T13:32:32.000Z (10 months ago)
- Last Synced: 2026-01-06T23:29:17.955Z (6 months ago)
- Topics: api-wrapper, biodiversity, conservation, iucn, iucn-red-list, r, r-package, rstats, taxize
- Language: R
- Homepage: https://docs.ropensci.org/rredlist
- Size: 2.33 MB
- Stars: 61
- Watchers: 7
- Forks: 17
- Open Issues: 2
-
Metadata Files:
- Readme: README.Rmd
- Changelog: NEWS.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Codemeta: codemeta.json
- Zenodo: .zenodo.json
Awesome Lists containing this project
- awesome-ecodata - R Client
- awesome-ecology - rredlist - Access to [IUCN Red List of Threatened Species API](http://apiv3.iucnredlist.org/) via R. (R Packages / Data Access)
- open-sustainable-technology - rredlist - An R client for the IUCN Red List of threatened and endangered species. (Biosphere / Biodiversity Data Access and Management)
README
# rredlist 
```{r echo=FALSE}
library("knitr")
library("rredlist")
hook_output <- knitr::knit_hooks$get("output")
knitr::knit_hooks$set(output = function(x, options) {
lines <- options$output.lines
if (is.null(lines)) {
return(hook_output(x, options)) # pass to default hook
}
x <- unlist(strsplit(x, "\n"))
more <- "..."
if (length(lines)==1) { # first n lines
if (length(x) > lines) {
# truncate the output, but add ....
x <- c(head(x, lines), more)
}
} else {
x <- c(if (abs(lines[1])>1) more else NULL,
x[lines],
if (length(x)>lines[abs(length(lines))]) more else NULL
)
}
# paste these lines together
x <- paste(c(x, ""), collapse = "\n")
hook_output(x, options)
})
knitr::opts_chunk$set(
warning = FALSE,
message = FALSE,
collapse = TRUE,
comment = "#>"
)
```
[](https://github.com/ropensci/software-review/issues/663)
[](https://www.repostatus.org/#active)
[](https://cran.r-project.org/package=rredlist)
[](https://github.com/ropensci/rredlist/actions/workflows/R-check.yml)
[](https://app.codecov.io/gh/ropensci/rredlist)
[](https://github.com/r-hub/cranlogs.app)
`rredlist` is an R client for the IUCN Red List API (https://api.iucnredlist.org). The [IUCN Red List](https://www.iucnredlist.org/) is the world’s most comprehensive information source on the global extinction risk status of animal, fungus, and plant species. This package provides access via R to the various data contained within this database which span range details, population size, habitat and ecology, use and/or trade, threats, and conservation actions. The functions within the package cover all endpoints of the IUCN Red List web API, which are documented [here](https://api.iucnredlist.org/api-docs/index.html).
## Installation
CRAN
```{r eval=FALSE}
install.packages("rredlist")
```
Development version
```{r eval=FALSE}
remotes::install_github("ropensci/rredlist")
# OR
install.packages("rredlist", repos = "https://ropensci.r-universe.dev/")
```
## Authentication
Use of this package requires an IUCN API key which can be acquired at https://api.iucnredlist.org/users/sign_up. There is a helper function to help you get the key and store it properly:
```{r eval=FALSE}
rredlist::rl_use_iucn()
```
**Keep this key private.** You can pass the key in to each function via the key parameter, but it’s better to store the key either as an environment variable (`IUCN_REDLIST_KEY`) or an R option (`iucn_redlist_key`) - we recommend using the former option. Note that there is not a default API key that is used as a fallback, and the package will not function without providing/storing your own API key.
## Example usage
### Loading the package
```{r}
library("rredlist")
```
### Search for assessments for a particular species
```{r output.lines=1:10}
rl_species("Gorilla", "gorilla")$assessments
```
### Search for assessments that recommend particular conservation actions
#### Get a list of all conservation actions
```{r output.lines=1:10}
rl_actions()
```
#### Return assessments with a particular conservation action
```{r output.lines=1:10}
rl_actions("2_2", all = FALSE)$assessments
```
## Logo

The `rredlist` logo showcases a silhouette of a [Javan rhinoceros](https://www.iucnredlist.org/species/19495/18493900) (_Rhinoceros sondaicus_), one of the most endangered mammal species on the planet. The species has suffered extreme population decline due to habitat loss and poaching, with only ~75 individuals alive in the wild today, all in Ujung Kulon National Park, a [UNESCO World Heritage Site](https://whc.unesco.org/en/list/608) in Java, Indonesia. Despite recent conservation efforts, [poaching continues](https://www.savetherhino.org/asia/indonesia/poaching-gangs-claim-to-have-killed-one-third-of-the-remaining-javan-rhino-population/); further, the small population is extremely susceptible to inbreeding, disease, and further habitat loss due to the rampant spreading of local palm trees. You can read more about the Javan rhino on the [IUCN Red List](https://www.iucnredlist.org/species/19495/18493900), [World Wildlife Fund](https://www.worldwildlife.org/species/javan-rhino), and [International Rhino Foundation](https://rhinos.org/about-rhinos/rhino-species/javan-rhino/).
This work, "rredlist logo", is adapted from ["Javan rhino silhouette"](https://creazilla.com/media/silhouette/64313/javan-rhino) by [Creazilla](https://creazilla.com/), used under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/). "rredlist logo" is licensed under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) by William Gearty.
## Meta
* Please [report any issues or bugs](https://github.com/ropensci/rredlist/issues).
* License: MIT
* Get citation information for `rredlist` in R doing `citation(package = 'rredlist')`
* Please note that this package is released with a [Contributor Code of Conduct](https://ropensci.org/code-of-conduct/). By contributing to this project, you agree to abide by its terms.
[](https://ropensci.org)
## Contributors
All contributions to this project are gratefully acknowledged using the [`allcontributors` package](https://github.com/ropensci/allcontributors) following the [allcontributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind are welcome!
### Code
### Issue Authors
### Issue Contributors