Skip to content

🔨 Derive nuclear status from EIA instead of hardcoded lists - #6699

Draft
pabloarosado wants to merge 1 commit into
masterfrom
refactor-nuclearstatus-eia
Draft

🔨 Derive nuclear status from EIA instead of hardcoded lists#6699
pabloarosado wants to merge 1 commit into
masterfrom
refactor-nuclearstatus-eia

Conversation

@pabloarosado

@pabloarosado pabloarosado commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Written by Claude Fable 5 — @pabloarosado at the wheel.

Placeholder branch. Nothing implemented yet.

Problem

Three garden steps independently decide which country-years have no nuclear power, and two of them hardcode the answer:

  • energy_institute/2026-06-30/statistical_review_of_world_energy: a 72-country list plus six hand-coded partial histories (Italy after 1990, Lithuania after 2009, Belarus from 2020, ...), around 150 lines with citations to external references.
  • energy/2026-06-30/energy_mix: a separate 114-country list, covering the countries that only reach us through the EIA total extension, plus 5 known-nuclear exceptions.
  • energy/2026-06-30/electricity_mix: no list, but it re-derives the zeros from the Statistical Review's already-filled data.

The two lists overlap on a single entity, so they are complementary rather than redundant. But both are maintained by hand and go stale whenever a country starts or stops generating nuclear power.

Proposal

EIA's international_energy already reports this as data. Its energy_consumption_from_nuclear column (terawatt-hours) covers 256 entities, including 131 of the Statistical Review's 132 (all but Curacao) and every historical state it reports. It agrees with every hand-curated entry:

  • All 114 countries in the energy_mix list report exactly 0, and all 5 exceptions report nonzero.
  • No contradiction with any of the 72 countries in the Statistical Review list.
  • All six partial histories match, at the exact cutoff year.

Add a small garden step derived from EIA that reports nuclear status per country-year, then load it in the three steps above and delete their bespoke logic.

Constraints

  • Three states, not two: "has nuclear", "no nuclear", and "unknown". An EIA data gap is not a zero, and collapsing the two would invent zeros.
  • Use EIA's zeros only, never its nonzero values. A zero is methodology-independent, but a nonzero EIA figure sits on EIA's own accounting basis rather than the Statistical Review's total energy supply basis.
  • This gives the Statistical Review a dependency on EIA for the first time, tying its build to another provider's release cycle.
  • Curacao is absent from EIA and will still need an explicit answer.
  • This touches the same function as 🐛 Energy mix: South America shares mix two producers, so it should land after it.

@owidbot

owidbot commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Quick links (staging server):

Site Dev Site Preview Admin Wizard Docs Docs Preview

Login: ssh owid@staging-site-refactor-nuclearstatus-eia

chart-diff: ✅ No charts for review.
data-diff: ✅ no differences

No differences found.

Automatically updated datasets matching excess_mortality|covid|fluid|flunet|country_profile|garden/ihme_gbd/2019/gbd_risk are not included. Run locally with etl diff REMOTE data/ --include <dataset> --verbose.

Edited: 2026-08-18 11:32:11 UTC
Execution time: 16.28 seconds

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.

2 participants