lvwerra HF Staff commited on
Commit
dd2b8fb
·
verified ·
1 Parent(s): f733efd

Label every group with an English name and fix the hover treatment

Browse files

The Sankey reads as untranslated Latin above the familiar ranks: Eumetazoa and Porifera say nothing to most readers. Each group now carries a short English name under its scientific name, and the hover state no longer draws a pale slab across the ribbons or stacks two tooltips on top of each other.

## English names

`data/common_names.json`, built by the new `refresh_common_names.py`, merges two sources:

* **NCBI Taxonomy** `genbank common name` and `common name` entries, about 9,200 taxa. This covers species, genera and familiar classes well (Porifera gets "sponges" straight from NCBI) but only 35 of the 200 largest groups in the atlas.
* **A curated table of ~190 short glosses** for the large unranked clades NCBI leaves unnamed, which are exactly the ones the atlas shows first: Opisthokonta "animals and fungi", Eumetazoa "animals with true tissues", Ecdysozoa "moulting animals", Endopterygota "insects with metamorphosis". Glosses are plain-language summaries of the living members of a clade, not formal synonyms.

The build verifies every curated taxid against the snapshot, so a renumbered clade fails the build instead of quietly mislabelling a branch, and it drops any gloss that only repeats the scientific name, so Fungi stays a single line.

Scientific names are now the primary label everywhere, replacing the ad-hoc `DISPLAY_NAMES` overrides. The gloss is the secondary line and also appears in the tooltip and the summary kicker. Rows grew from 36 to 46 points to seat the third line.

## Hover fixes

* The hover highlight filled `.tree-hit`, a 210-point rounded rect that reached across the ribbons behind each label and read as a floating box. The hit area stays clickable but is never painted; hover now reads on the label and the bar outline.
* Each node group carried both a `<title>` and a `data-detail`, so the browser drew its own tooltip on top of the styled one. The `<title>` is gone; `aria-label` still names each node for assistive technology.

## Icons

Not implemented, but the source is recorded in `FEATURE_BACKLOG.md`: [PhyloPic](https://www.phylopic.org) resolves NCBI taxids directly and walks up the tree when a clade has no silhouette of its own, via `GET https://api.phylopic.org/resolve/ncbi.nlm.nih.gov/taxid/{taxid}?embed_primaryImage=true`. Two things need settling first: licences differ per image (CC0, CC BY 4.0, CC BY-SA 3.0, and at least one CC BY-NC-SA 3.0 among the groups shown first), so each icon needs its own credit and the non-commercial ones need replacing; and the SVGs should be vendored rather than hot-linked, to keep the Space free of external requests.

## Tests

`tests/test_taxonomy.py` gains coverage for the glosses, the single tooltip, and the curated taxids still matching their scientific names in the snapshot. A length check already caught one gloss that would have been clipped in the chart. All 8 tests pass.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

7 files changed +9730 -24
Files changed (7)
FEATURE_BACKLOG.md+2
README.md+3-1
atlas.css+6-4
data/common_names.jsonAdded
The diff for this file is too large to render. See raw diff
refresh_common_names.pyAdded+273
taxonomy.py+40-18
tests/test_taxonomy.py+35-1