Skip to content

feat(data): default Gini source moves to World Bank WDI - #19

Merged
setupelz merged 1 commit into
mainfrom
feature/gini-wdi-default
Aug 3, 2026
Merged

setupelz merged 1 commit into
mainfrom
feature/gini-wdi-default

Conversation

@setupelz

@setupelz setupelz commented Aug 3, 2026

Copy link
Copy Markdown
Owner

Summary

  • WIID (CC BY-NC-SA) becomes opt-in; WDI SI.POV.GINI (CC BY 4.0) is the default, latest observation in 2015-2023 per country
  • analysis-country membership no longer depends on Gini availability: set grows 167 -> 176, missing Gini gets the analysis mean (gini_missing_policy: fallback-mean | strict), flagged gini_imputed
  • eight duplicated coverage/Gini implementations routed through one helper; API path previously wrote country_gini_stationary.csv without the ROW row the notebook path had
  • fix capability snapshots: the Gini adjustment now applies on the pre-window capability_reference_year branch too, budgets and pathways alike (was silently unadjusted, and documented as such)
  • re-pin WDI GDP hashes to the regenerated 2026-07-13 upstream export
  • analysis/gini_source_comparison.py quantifies the swap: 150 vs 194 countries, value drift is the consumption-vs-income welfare gap (largest: India +55 Gt on gini-adjusted budgets)
  • fix notebook 100: passed the removed project_root= argument, RCB pipeline could not run

Lint & Test Results

  • Lint: pre-existing repo-wide debt (118 errors on main baseline vs 116 on this branch); not introduced by this changeset, CI does not run ruff for this repo
  • Tests: 742 passed, 11 deselected

Test Plan

  • uv run python -m pytest tests/ -q

- WIID (CC BY-NC-SA) becomes opt-in; WDI SI.POV.GINI (CC BY 4.0) is
  the default, latest observation in 2015-2023 per country
- analysis-country membership no longer depends on Gini availability:
  set grows 167 -> 176, missing Gini gets the analysis mean
  (gini_missing_policy: fallback-mean | strict), flagged gini_imputed
- eight duplicated coverage/Gini implementations routed through one
  helper; API path previously wrote country_gini_stationary.csv
  without the ROW row the notebook path had
- fix capability snapshots: the Gini adjustment now applies on the
  pre-window capability_reference_year branch too, budgets and
  pathways alike (was silently unadjusted, and documented as such)
- re-pin WDI GDP hashes to the regenerated 2026-07-13 upstream export
- analysis/gini_source_comparison.py quantifies the swap: 150 vs 194
  countries, value drift is the consumption-vs-income welfare gap
  (largest: India +55 Gt on gini-adjusted budgets)
- fix notebook 100: passed the removed project_root= argument, RCB
  pipeline could not run
@setupelz
setupelz merged commit 9e51df4 into main Aug 3, 2026
3 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