The normalised scored-taxon table (app/taxon.parquet and the shard source)
Source: R/app_bundle.R
app_taxon_table.RdOne schema for every release: key, sci, common, sp_cat, taxon_id, taxon_authority, rl, er_code, esa_source, er_score, is_mmpa, is_mbta, valid_usa, valid_global. v1/v2 have no extinction-risk columns at all, so they
arrive as typed NULLs rather than making those two releases fail outright with
Binder Error: ... does not have a column named "extrisk_code".
Details
The set is the one the species app offers: key not null, the release's own
validity (is_ok on v1-v7, is_valid_usa OR is_valid_global on v8+), is_marine
where the column exists, and sp_cat NOT IN ('reptile','amphibian').
Every taxon_id is asserted to be digits only. A DOUBLE column is cast through
an integer type only where the value is whole, because CAST(12.7 AS HUGEINT)
rounds to 13 — a different and possibly existing id that nothing downstream could
tell from a real one. A non-integral id is therefore a hard stop naming the row,
not something to publish.