Skip to content

feat(units): declare the count base of a per-N rate - #40

Merged
jm-rivera merged 4 commits into
devfrom
feat/unit-count-base
Oct 31, 2026
Merged

jm-rivera merged 4 commits into
devfrom
feat/unit-count-base

Conversation

@jm-rivera

Copy link
Copy Markdown
Contributor

registries/units.json gains a rate kind, {ref, kind: "rate", count_base, counted, evidence}, and dfo_spec_kit.units a Rate type. The graph holds no numeric base for a per-N rate: unit nodes carry only names, scalingFactor is a per-import multiplier, and measurementDenominator reads Count_Person, so a consumer that reads "per 1,000 people" needs this declared as data.

The registry adds 59 rate rows: 8 UnitOfMeasure, 8 SDG, and 43 from the UN deployment, each with evidence. Four have no counted noun. Units with no series at the 27 entities scanned, hourly dosage units, percent units, an area ratio, and base-one units such as per-household are left out.

The UN deployment was sampled over 10 entities out of 127 units, so a later unit may need a row.

DevelopmentFinanceObservatory/apis#140 reads this to replace "per capita" on these series. Stacked on spec-kit#39.

Testing: 88 unit rows, 48 vectors, 622 tools tests, and 271 spec-kit tests pass.

@jm-rivera
jm-rivera changed the base branch from fix/presentation-read-endpoints to dev October 31, 2026 20:34
@jm-rivera
jm-rivera merged commit 123a542 into dev Oct 31, 2026
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant