get_threatened_database: Get Threatened Species Database

View source: R/data-access.R

get_threatened_databaseR Documentation

Get Threatened Species Database

Description

Retrieves the threatened plant species database for Peru. This function provides controlled access to the internal datasets used by the package.

Usage

get_threatened_database(type = c("original", "updated"))

Arguments

type

Character string specifying which database version to retrieve. Options are:

  • "original" (default): Original nomenclature from DS 043-2006-AG (2006)

  • "updated": Updated nomenclature with current taxonomic consensus

Value

A tibble containing the threatened species database.

Database Structure

**Original Database** (type = "original"):

  • ~777 species as listed in DS 043-2006-AG

  • Supports quaternomial names (Rank 4)

  • Includes both accepted names and synonyms

  • Columns: scientific_name, genus, species, tag, infraspecies, tag_2, infraspecies_2, threat_category, accepted_name_author, taxonomic_status, accepted_name, family, protected_ds_043

**Updated Database** (type = "updated"):

  • Updated nomenclature using WCVP and POWO

  • Supports trinomial names (Rank 3 maximum)

  • Only accepted names (synonyms resolved)

  • Columns: scientific_name, genus, species, tag_acc, infraspecies, threat_category, accepted_name_author, taxonomic_status, accepted_name, family, protected_ds_043

Threat Categories

CR

Critically Endangered

EN

Endangered

VU

Vulnerable

NT

Near Threatened

Legal Context

Data based on Supreme Decree DS 043-2006-AG, Ministry of Agriculture, Peru (July 13, 2006), which establishes the official list of threatened wild flora species in Peru.

Note

This function is primarily for advanced users who need direct access to the database structure. For most use cases, use the higher-level functions: is_threatened_peru or is_ds043_2006_ag.

See Also

is_threatened_peru to check threat status of species is_ds043_2006_ag to check DS 043 protection status

Examples


# Get original database
db_original <- get_threatened_database(type = "original")
str(db_original)
nrow(db_original)

# Get updated database
db_updated <- get_threatened_database(type = "updated")
str(db_updated)

# Compare number of species
n_original <- nrow(db_original)
n_updated <- nrow(db_updated)
cat("Original:", n_original, "| Updated:", n_updated, "\n")

# Count by threat category
table(db_original$threat_category)

# Find critically endangered orchids
orchids <- db_original[db_original$family == "ORCHIDACEAE" &
                       db_original$threat_category == "CR", ]
head(orchids$scientific_name)


peruflorads43 documentation built on Nov. 24, 2025, 10:15 a.m.