The taxa that no authority resolved, per dataset — reported, and gated
Source:R/check.R
check_taxon_ids.RdA taxon that reaches the release without an authority id is invisible to any
consumer that filters or joins on one, and nothing used to say so. That is how
all 128 Farallon taxa and 64,956 observations became unreachable through
db-viz-hex::get_sp()'s worms_id join while every check in the pipeline
passed.
Usage
check_taxon_ids(con, allow = character(), halt = TRUE, verbose = TRUE)Arguments
- con
a DBI connection holding
taxonanddataset_taxon(andobs, if present, for the observation-level counts)- allow
character vector of dataset-local
taxon_keys that are known to be unresolvable and are accepted as such- halt
logical;
stop()on an unallowlisted local key (defaultTRUE)- verbose
logical; message the summary
Value
a data.frame, one row per dataset_key, with the taxon- and
observation-level counts (invisibly when verbose = FALSE)
Details
Two conditions, deliberately graded differently:
A dataset-local
taxon_key(noworms:/itis:prefix) means no authority resolved this taxon at all. This fails unless the key is inallow— the allowlist is where a genuinely non-taxonomic class such ascce-lter_zooscan:16(naupliar stage) is declared, in the open, one key at a time. A new unresolved taxon can then never hide among the known ones.An authority key with no
worms_idis reported but does not fail: WoRMS legitimately lacks some taxa (trinomial subspecies, mostly), and anitis:-keyed bird is correctly keyed either way.