| get_threatened_database | R Documentation |
Retrieves the threatened plant species database for Peru. This function provides controlled access to the internal datasets used by the package.
get_threatened_database(type = c("original", "updated"))
type |
Character string specifying which database version to retrieve. Options are:
|
A tibble containing the threatened species database.
**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
Critically Endangered
Endangered
Vulnerable
Near Threatened
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.
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.
is_threatened_peru to check threat status of species
is_ds043_2006_ag to check DS 043 protection status
# 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.