Learn R Programming

rredlist

rredlist is an R client for the IUCN Red List API (https://api.iucnredlist.org). The IUCN Red List 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.

Installation

CRAN

install.packages("rredlist")

Development version

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:

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

library("rredlist")

Search for assessments for a particular species

rl_species("Gorilla", "gorilla")$assessments
#>    year_published latest possibly_extinct possibly_extinct_in_the_wild sis_taxon_id
#> 1            2016  FALSE            FALSE                        FALSE         9404
#> 2            2018   TRUE            FALSE                        FALSE         9404
#> 3            2016  FALSE            FALSE                        FALSE         9404
#> 4            2008  FALSE            FALSE                        FALSE         9404
#> 5            2007  FALSE            FALSE                        FALSE         9404
#> 6            2000  FALSE            FALSE                        FALSE         9404
#> 7            1996  FALSE            FALSE                        FALSE         9404
#> 8            1994  FALSE            FALSE                        FALSE         9404
#> 9            1990  FALSE            FALSE                        FALSE         9404
...

Search for assessments that recommend particular conservation actions

Get a list of all conservation actions

rl_actions()
#> $conservation_actions
#>                                              en  code
#> 1                         Land/water protection     1
#> 2                          Site/area protection   1_1
#> 3                 Resource & habitat protection   1_2
#> 4                         Land/water management     2
#> 5                          Site/area management   2_1
#> 6          Invasive/problematic species control   2_2
#> 7         Habitat & natural process restoration   2_3
#> 8                            Species management     3
...

Return assessments with a particular conservation action

rl_actions("2_2", all = FALSE)$assessments
#>     year_published latest possibly_extinct possibly_extinct_in_the_wild sis_taxon_id
#> 1             2019   TRUE            FALSE                        FALSE    132523146
#> 2             2019   TRUE            FALSE                        FALSE        10767
#> 3             2013   TRUE            FALSE                        FALSE         1078
#> 4             2019   TRUE            FALSE                        FALSE    132521900
#> 5             2020  FALSE            FALSE                        FALSE         1086
#> 6             2019   TRUE            FALSE                        FALSE         1117
#> 7             2019   TRUE            FALSE                        FALSE        11797
#> 8             2021   TRUE            FALSE                        FALSE        12124
#> 9             2019   TRUE            FALSE                        FALSE        12695
...

Logo

The rredlist logo showcases a silhouette of a Javan rhinoceros (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 in Java, Indonesia. Despite recent conservation efforts, poaching continues; 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, World Wildlife Fund, and International Rhino Foundation.

This work, "rredlist logo", is adapted from "Javan rhino silhouette" by Creazilla, used under CC BY 4.0. "rredlist logo" is licensed under CC BY 4.0 by William Gearty.

Meta

  • Please report any issues or bugs.
  • 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. By contributing to this project, you agree to abide by its terms.

Copy Link

Version

Install

install.packages('rredlist')

Monthly Downloads

1,698

Version

1.0.0

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

William Gearty

Last Published

January 31st, 2025

Functions in rredlist (1.0.0)

rl_growth_forms

Growth form assessment summary
rl_habitats

Habitat assessment summary
rl_pop_trends

Population trend assessment summary
rl_narrative

Get species narrative information by taxon name, IUCN id, and region
rl_phylum

Phylum assessment summary
rl_sis

SIS ID assessment summary
rl_kingdom

Kingdom assessment summary
rl_green

Green Status assessment summary
rl_search

Search by taxon name, IUCN id, and region
rl_faos

FAO marine fishing region assessment summary
rl_research

Research needed assessment summary
rl_scopes

Scope assessment summary
rl_stresses

Stress assessment summary
rl_occ_country

Get country occurrence by species name or ID
rl_family

Family assessment summary
rl_synonyms

Get species synonym information by taxonomic name
rl_extinct_wild

Extinct taxa in the wild assessment summary
rl_sis_latest

SIS ID latest assessment
rl_order

Order assessment summary
rl_species

Species assessment summary
rl_species_latest

Species latest assessment
rl_realms

Biogeographical realm assessment summary
rl_regions

Get regions
rl_use_and_trade

Use and trade assessment summary
rl_version

Get the Red List version
rredlist-package

rredlist: 'IUCN' Red List Client
scale_color_iucn

IUCN Red List color scales
rl_sp

Get species
rl_sp_count

Get count of species in the Red List
rl_sp_country

Get species by country
rl_use_iucn

Helper to get and save IUCN API key
rl_systems

System assessment summary
rl_threats

Threat assessment summary
rl_sp_category

Get species by category
rl_sp_citation

Get citations by taxon name, IUCN id, and region
rl_extinct

Extinct taxa assessment summary
rl_class

Class assessment summary
rl_actions

Conservation actions needed assessment summary
rl_categories

Red List category assessment summary
rl_common_names

Get common names for a given taxonomic name
rl_citation

Get the citation for the Red List API
rl_countries

Country assessment summary
rl_comp_groups

Comprehensive group assessment summary
rl_api_version

Get the Red List API version
rl_assessment

Retrieve an assessment
rl_history

Get historical assessments by taxon name, IUCN id, and region
rl_measures

Get species conservation measures by taxon name, IUCN id, and region