Skip to content

Add oecd:dotstat code system (OECD Data Explorer codes) - #19

Merged
jm-rivera merged 4 commits into
mainfrom
oecd-dotstat
Jun 15, 2026
Merged

Add oecd:dotstat code system (OECD Data Explorer codes)#19
jm-rivera merged 4 commits into
mainfrom
oecd-dotstat

Conversation

@jm-rivera

Copy link
Copy Markdown
Owner

Adds a new oecd:dotstat code system carrying the OECD Data Explorer codes (the post-2024 identifier scheme) on DAC provider and recipient entities, alongside the existing legacy numeric oecd:provider/oecd:recipient codes. This makes resolvekit an offline crosswalk between the old OECD.Stat codes and the new Data Explorer codes: a value in either system resolves to the same entity and converts to the other.

The OECD feed already delivered the dotstatcode field; the ingest projector was discarding it. It is preserved for providers and recipients (channels and agencies carry none), kept distinct from iso3 (they diverge for Kosovo and for region/multilateral aggregates with no ISO3), and excluded from input auto-detection.

Bundled data packs (geo.countries, geo.regions, org.providers, geo.continental_unions) are rebuilt to ship the codes — purely additive, 349 codes added, nothing else changed. Targets 0.1.12.

Preserve the OECD Data Explorer code (the post-2024 identifier scheme) that the
OECD codelists feed already delivers but the ingest projector was discarding,
and expose it as a new oecd:dotstat code system on DAC provider and recipient
entities, alongside the existing legacy numeric oecd:provider/oecd:recipient
codes. This makes resolvekit an offline crosswalk between the old OECD.Stat
codes and the new Data Explorer codes.

- refresh_oecd_dac.py: projector keeps the dotstatcode field (providers,
  recipients; channels and agencies carry none)
- oecd_dac.py: guarded _attach_dotstat_code helper at the five provider/recipient
  emission sites
- oecd_dac.yaml: regenerated from the live OECD feed (additive dotstatcode only)
- kept distinct from iso3 (Kosovo XKX vs XKV; region/multilateral aggregates have
  no iso3) and excluded from input auto-detection
- docs + changelog (0.1.12)

Bundled data packs are rebuilt in a follow-up commit.
Rebuild of the four bundled packs that carry DAC provider/recipient entities
(geo.countries, geo.regions, org.providers, geo.continental_unions) so the
wheel ships the new oecd:dotstat code system. Purely additive: 349 oecd:dotstat
codes added across the packs; entities, names, relations, and all other code
systems are unchanged. Manifest checksums re-stamped via sync_manifest.
The OECD live codelist publishes only currently-active codes, but old ODA data
references graduated territories (Anguilla, Aruba, Hong Kong, Macao, the Gulf
states, ...) that left the recipient list. Add those 28 historical recipient
codes (collision-checked against active codes; entities already exist) so the
old<->new crosswalk can translate older data.

Rewrite the refresh script's regenerate step to merge ADDITIVELY for recipients
and providers: preserve committed codes the live feed omits (historical), add
new active codes, adopt live values for shared codes but report changes for
review. A wholesale regenerate would have proposed deleting every historical
code. Channels and agencies (duplicate rows, no unique key, no historical need)
pass through from the live fetch.

Dissolved states whose numeric codes the OECD reassigned (Netherlands Antilles
236->Benin, Serbia and Montenegro 382->Saint Kitts) are deferred — they need
date-scoped codes to resolve unambiguously.
Rebuild of geo.countries carrying the 28 graduated-territory recipient codes:
+28 oecd:recipient, +17 oecd:dotstat (11 territories already had dotstat via the
provider path), +6 OECD-name aliases. Entities, relations, and all non-OECD
codes unchanged. Manifest re-stamped.
@jm-rivera
jm-rivera merged commit f12199c into main Jun 15, 2026
6 checks passed
@jm-rivera
jm-rivera deleted the oecd-dotstat branch June 15, 2026 11:42
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