← Back to all sparks
A

APCalign

ANALYTICS
Velocity2.5

Resolving Plant Taxon Names Using the Australian Plant Census

APCalign spent this year fixing the counts it had been quietly getting wrong

taxonomyraustralian florabiodiversitydata qualityname matching
Current state
APCalign standardises Australian plant names against the APC and APNI taxonomic resources and derives state-level native/introduced status from them. The feed is GitHub releases tagged by resource download date rather than semantic version, so titles carry no information about content. The two 2026 releases are the only substantive ones in the window: infrataxa support in the diversity functions, then a fix for a grep that had been matching the wrong columns.
Where it's heading
Development is driven by users reporting that outputs do not match what they expect, and the fixes keep landing in the same two functions — create_species_state_origin_matrix() and native_anywhere_in_australia(). The infrataxa parameter and the reordered output columns came from user requests; the guard-ordering and grep fixes came from a filed issue. What is emerging is that the origin-matrix logic was written loosely and is now being tightened case by case, with tests and state diversity benchmarks added alongside.
Prediction
Both recent releases touched the same pair of functions and the fixes were found by inspection rather than by tests failing, so more corrections in the native-status path are the likely next content — the benchmarks added in March are the mechanism that would surface them.

Recent moves

  1. 16d ago

    APCalign fixes a grep that scanned taxon names for native status

    A correctness fix worth more than its size. native_anywhere_in_australia() ran grepl("native", ...) across a character-coerced version of the whole lookup table, so family, species and taxon_ID columns were searched alongside the state columns — any taxon whose own name contained the string could be misclassified. A misplaced is.null(resources) guard is also moved to the top of the function, replacing a duplicated offline error message and a wasted call.

    View source ↗
  2. 4mo ago

    APCalign adds infrataxa to the state origin and diversity functions

    User-requested coverage: create_species_state_origin_matrix() and native_anywhere_in_australia() gain a parameter to include infrataxa, output columns are reordered to put states and territories first with islands after, and family and taxon_id join the output table. Tests and state diversity benchmarks land with it — the infrastructure that makes the later correctness work checkable.

    View source ↗
  3. 1y ago

    Taxonomic resource snapshot from APC and APNI

    A data refresh rather than a code release — APC and APNI resources captured as of a fixed date. These snapshots are what the tagging scheme is built around.

    View source ↗
  4. 1y ago

    Release tags switch to APC download date

    A process change: GitHub release tags now carry the APC download date while the code keeps semantic versioning. This is why the feed's titles are bare dates and say nothing about what changed.

    View source ↗
  5. 1y ago

    Fix for the quiet option

    A one-line fix to the quiet option plus regenerated documentation.

    View source ↗