assemble_taxonomic: Assemble the taxonomicCoverage tree in EML

View source: R/assemble_taxonomy.R

assemble_taxonomicR Documentation

Assemble the taxonomicCoverage tree in EML

Description

This function takes the information in metabase and assembles a fully fleshed out taxonomicCoverage EML tree, or more correctly a list of taxonomicClassification nodes. The function will use information from the taxonid, taxonrankvalue, taxonid_provider, and (if you have it) providerurl columns from the vw_eml_taxonomy view queried from metabase. It expects taxonid to contain the correct identifier for the taxon from the listed taxonomic authority/provider, taxonrankvalue to contain the taxon's name, taxonid_provider to provide a correctly spelled name or commonly used ID for the taxonomic provider/authority (e.g. ITIS for the Integrated Taxonomy Information System), and providerurl to contain a working url to the same.

Usage

assemble_taxonomic(taxa_df, expand_taxa = FALSE)

Arguments

taxa_df

(data.frame) A data.frame with taxonomic information. This is normally queried from a view in LTER-core-metabase, and the function expects certain column names (taxonid, taxonid_provider, provider_url, providerid, taxonrankname, and taxonrankvalue).

expand_taxa

(logical) TRUE/FALSE on whether to lookup and fully expand a leaf node taxon's full taxonomic classification (kingdom to the lowest rank provided) into nested EML taxonomicCoverage elements (TRUE) or simply make a taxonomic coverage module based on the information provided in metabase (FALSE). This assumes, of course, that the taxa provided are only the leaf nodes. If so, setting this to TRUE and having the full classification may help your dataset be more discover-able, however the lookup process may be more prone to errors. If this is set to TRUE, rows containing taxa from unsupported providers, or from supported providers but whose classification lookups fail, will not be expanded. Defaults to FALSE.

Value

(list) List of taxonomicClassification nodes, in emld list format, one per row of taxa_df


atn38/metabase-to-eml-R documentation built on June 12, 2025, 6:18 p.m.