redlist

Provides interface to access data from the IUCN Red List, designed to support conservation efforts and biodiversity research by enabling users to programmatically access up-to-date Red List data.

https://github.com/stangandaho/redlist

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (18.4%) to scientific vocabulary

Keywords

bioinformatics conservation ecology iucn-red-list iucn-red-list-in-r redlist
Last synced: 6 months ago · JSON representation

Repository

Provides interface to access data from the IUCN Red List, designed to support conservation efforts and biodiversity research by enabling users to programmatically access up-to-date Red List data.

Basic Info
Statistics
  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Topics
bioinformatics conservation ecology iucn-red-list iucn-red-list-in-r redlist
Created over 1 year ago · Last pushed 7 months ago
Metadata Files
Readme Changelog License Code of conduct

README.md

IUCN Red List R Package

redlist logo

R-CMD-check CRAN status <!-- badges: end --> codecov

About This Project

Started in September 2024, this project originated when rredlist was still tied to the deprecated IUCN Red List V3 API. By January 2025, rredlist had transitioned to support the V4 API, introducing substantial structural changes. I continued developing my own approach, which led to redlist — a standalone client designed around consistent tibble outputs and streamlined workflows.

In parallel, there is also the official IUCN-supported package iucnredlist, which provides direct access to the same V4 API. Although these packages all use API V4, they differ in design: redlist focuses on a fresh, independent approach with uniform inputs and outputs for all endpoints, while iucnredlist represents the official reference implementation.
These differences mean the packages are not in competition but are complementary, serving different user preferences.

Get started

📦 Installation

```r

Install from CRAN

install.packages("redlist")

Install from GitHub

if (!requireNamespace("pak", quietly = TRUE)) { install.packages("pak", dependencies = TRUE) } pak::pkg_install("stangandaho/redlist")

Load

library(redlist) ```

🔑 Set Your API Key

If you're using this package for the first time, you'll likely need an IUCN Red List API key.
You can check whether it's set by running rl_check_api().
If this throws an error like '*! No Redlist API key found... *', you'll need to set an API key before using any of the package functions. Just follow these two simple steps:
1. Visit the official IUCN Red List API website here. Create an account if you don't already have one. Once logged in, you can request your API key.
2. Copy your API key and set it using the rl_set_api() function, like this rl_set_api("2GoWiThmYrEDlitApiThatWorkS4me").
You can then run rl_check_api() again to confirm that your API key is set successfully.

Please ensure that you have read and agreed to the API key terms of use and have complied with them during your usage.

Usage

The redlist package offers simple functions to retrieve and explore IUCN Red List data.

```r

Retrieve Red List data for Benin (country code "BJ"), first page by default

beninredlist <- rlcountries(code = "BJ") # Get first 100 records head(benin_redlist) # Preview the data

Retrieve data from first 5 pages (up to 500 records)

beninredlistpages <- rl_countries(code = "BJ", page = 1:5)

Retrieve data from first 5 pages, filtered by year published 2023

beninredlist2023 <- rlcountries(code = "BJ", page = 1:5, yearpublished = 2023)

Retrieve all available data for Benin (no page limit)

beninredlistall <- rl_countries(code = "BJ", page = NA)

Get detailed species info by passing a species sis_id (example: 137286)

speciesinfo <- rlsis(sis_id = 137286)

Get detailed assessment info by passing an assessment_id (example: 522738)

assessmentinfo <- rlassessmentid(assessmentid = 522738)

Loop through multiple assessment_ids to collect detailed data for all species

allspeciesdetails <- lapply(beninredlist$assessmentsassessmentid, function(id) { rlassessmentid(assessmentid = id) }) %>% dplyr::bind_rows() ```

For a full overview of all available functions, please visit the redlist website

Code of conduct

Please note that this project is based on the Contributor Covenant v2.1. By participating in this project you agree to abide by its terms.

Getting help

If you encounter a clear bug, please file an issue with a minimal reproducible example. For questions and other discussion, please use relevant section.

Owner

  • Name: Stanislas Mahussi GANDAHO
  • Login: stangandaho
  • Kind: user
  • Location: Benin

GitHub Events

Total
  • Watch event: 3
  • Push event: 42
  • Create event: 1
Last Year
  • Watch event: 3
  • Push event: 42
  • Create event: 1

Packages

  • Total packages: 1
  • Total downloads: unknown
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 1
  • Total maintainers: 1
cran.r-project.org: redlist

Interface to the IUCN Red List Data

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 0 Last month
Rankings
Dependent packages count: 25.7%
Dependent repos count: 31.6%
Average: 47.6%
Downloads: 85.4%
Maintainers (1)
Last synced: 6 months ago

Dependencies

DESCRIPTION cran
  • dplyr * imports
  • httr2 * imports
  • jsonlite * imports
.github/workflows/R-CMD-check.yaml actions
  • actions/checkout v4 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/pkgdown.yaml actions
  • JamesIves/github-pages-deploy-action v4.5.0 composite
  • actions/checkout v4 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/test-coverage.yaml actions
  • actions/checkout v4 composite
  • actions/upload-artifact v4 composite
  • codecov/codecov-action v5 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite