🔨 Derive nuclear status from EIA instead of hardcoded lists - #6699
Draft
pabloarosado wants to merge 1 commit into
Draft
🔨 Derive nuclear status from EIA instead of hardcoded lists#6699pabloarosado wants to merge 1 commit into
pabloarosado wants to merge 1 commit into
Conversation
Contributor
|
Quick links (staging server):
Login: chart-diff: ✅No charts for review.data-diff: ✅ no differencesNo 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 Edited: 2026-08-18 11:32:11 UTC |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_energyalready reports this as data. Itsenergy_consumption_from_nuclearcolumn (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:energy_mixlist report exactly 0, and all 5 exceptions report nonzero.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