Build Taxon Hierarchy from Local spp.duckdb via Recursive CTEs
Source:R/taxonomy.R
build_taxon_hierarchy.RdBuilds the taxon and taxa_rank tables using recursive CTEs
against the local MarineSensitivity species database (spp.duckdb).
This is much faster than build_taxon_table() which queries WoRMS/ITIS
APIs for each species.
Details
Creates both WoRMS and ITIS hierarchies by walking up the
parentNameUsageID chain from each species' WoRMS/ITIS ID.
Examples
if (FALSE) { # \dontrun{
con <- get_duckdb_con("calcofi.duckdb")
taxon <- build_taxon_hierarchy(
con = con,
spp_db_path = "/path/to/spp.duckdb")
} # }