A curated list of open technology projects to sustain a stable climate, energy supply, biodiversity and natural resources.

rredlist

An R client for the IUCN Red List of threatened and endangered species.
https://github.com/ropensci/rredlist

Category: Biosphere
Sub Category: Biodiversity Data Access and Management

Keywords

api-wrapper biodiversity conservation iucn iucn-red-list r r-package rstats taxize

Keywords from Contributors

genome occurrences cycle routes geocode air-pollution ecology database-retrieval biomart ebird

Last synced: about 17 hours ago
JSON representation

Repository metadata

IUCN Red List API Client

README.Rmd

          # 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 = "#>"
)
```

[![Status at rOpenSci Software Peer Review](https://badges.ropensci.org/663_status.svg)](https://github.com/ropensci/software-review/issues/663)
[![Project Status: Active – The project has reached a stable, usable state and is being actively developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active)
[![cran version](https://www.r-pkg.org/badges/version/rredlist)](https://cran.r-project.org/package=rredlist)
[![R-check](https://github.com/ropensci/rredlist/actions/workflows/R-check.yml/badge.svg)](https://github.com/ropensci/rredlist/actions/workflows/R-check.yml)
[![codecov.io](https://codecov.io/gh/ropensci/rredlist/coverage.svg)](https://app.codecov.io/gh/ropensci/rredlist)
[![rstudio mirror downloads](https://cranlogs.r-pkg.org/badges/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](https://tnujungkulon.menlhk.go.id/), 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.

[![rofooter](https://ropensci.org/public_images/github_footer.png)](https://ropensci.org)

        

Owner metadata


GitHub Events

Total
Last Year

Committers metadata

Last synced: 7 days ago

Total Commits: 169
Total Committers: 6
Avg Commits per committer: 28.167
Development Distribution Score (DDS): 0.296

Commits in past year: 31
Committers in past year: 3
Avg Commits per committer in past year: 10.333
Development Distribution Score (DDS) in past year: 0.065

Name Email Commits
Scott Chamberlain m****s@g****m 119
William Gearty w****y@g****m 34
Maëlle Salmon m****n@y****e 13
Kevin Cazelles k****s@i****o 1
Jeroen Ooms j****s@g****m 1
rOpenSci Bot m****t@g****m 1

Committer domains:


Issue and Pull Request metadata

Last synced: 1 day ago

Total issues: 59
Total pull requests: 11
Average time to close issues: 7 months
Average time to close pull requests: about 1 month
Total issue authors: 22
Total pull request authors: 6
Average comments per issue: 3.31
Average comments per pull request: 3.64
Merged pull request: 10
Bot issues: 0
Bot pull requests: 0

Past year issues: 10
Past year pull requests: 5
Past year average time to close issues: 5 days
Past year average time to close pull requests: 16 days
Past year issue authors: 10
Past year pull request authors: 3
Past year average comments per issue: 3.3
Past year average comments per pull request: 3.2
Past year merged pull request: 5
Past year bot issues: 0
Past year bot pull requests: 0

More stats: https://issues.ecosyste.ms/repositories/lookup?url=https://github.com/ropensci/rredlist

Top Issue Authors

  • sckott (29)
  • maelle (6)
  • arw36 (4)
  • stevenpbachman (2)
  • michitobler (1)
  • lime-n (1)
  • Lisa-Tedeschi (1)
  • DanielIAvila (1)
  • electricquad (1)
  • martijnvandepol (1)
  • cpavloud (1)
  • FVFaleiro (1)
  • wk-ai (1)
  • Gopal-Murali (1)
  • makosiaaa (1)

Top Pull Request Authors

  • maelle (3)
  • willgearty (2)
  • sckott (2)
  • KevCaz (2)
  • arw36 (1)
  • jeffreyhanson (1)

Top Issue Labels

  • bug (2)
  • help wanted (1)
  • api feature request (1)

Top Pull Request Labels

  • api update (1)
  • work in progress (1)

Package metadata

cran.r-project.org: rredlist

'IUCN' Red List Client

  • Homepage: https://docs.ropensci.org/rredlist/
  • Documentation: http://cran.r-project.org/web/packages/rredlist/rredlist.pdf
  • Licenses: MIT + file LICENSE
  • Latest release: 1.0.0 (published 3 months ago)
  • Last Synced: 2025-04-25T13:03:35.148Z (1 day ago)
  • Versions: 9
  • Dependent Packages: 1
  • Dependent Repositories: 5
  • Downloads: 4,902 Last month
  • Docker Downloads: 200,502
  • Rankings:
    • Downloads: 7.631%
    • Dependent repos count: 13.077%
    • Average: 15.778%
    • Dependent packages count: 18.166%
    • Docker downloads count: 24.239%
  • Maintainers (1)
conda-forge.org: r-rredlist

  • Homepage: https://github.com/ropensci/rredlist
  • Licenses: MIT
  • Latest release: 0.7.1 (published over 2 years ago)
  • Last Synced: 2025-04-02T02:13:29.429Z (25 days ago)
  • Versions: 5
  • Dependent Packages: 1
  • Dependent Repositories: 0
  • Rankings:
    • Dependent packages count: 28.82%
    • Dependent repos count: 34.025%
    • Average: 35.576%
    • Forks count: 39.002%
    • Stargazers count: 40.459%

Dependencies

DESCRIPTION cran
  • crul >= 0.3.8 imports
  • jsonlite >= 1.1 imports
  • testthat * suggests
  • vcr >= 0.4.0 suggests
.github/workflows/R-check.yml actions
  • actions/checkout v2 composite
  • r-lib/actions/check-r-package v2 composite
  • r-lib/actions/setup-pandoc v2 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite
.github/workflows/lint.yaml actions
  • actions/cache v2 composite
  • actions/checkout v2 composite
  • r-lib/actions/setup-r v1 composite
.github/workflows/revdepcheck.yml actions
  • actions/cache v2 composite
  • actions/checkout v2 composite
  • actions/upload-artifact main composite
  • r-lib/actions/setup-pandoc v2 composite
  • r-lib/actions/setup-r v2 composite
.github/workflows/test-coverage.yaml actions
  • actions/cache v2 composite
  • actions/checkout v2 composite
  • r-lib/actions/setup-pandoc v1 composite
  • r-lib/actions/setup-r v1 composite

Score: 18.031958144573426