Add open-license energy balance sources - #543
Draft
Wegatriespython wants to merge 1 commit into
Draft
Conversation
Add tools/unsd.py and tools/eurostat.py: national energy balances from the UN Statistics Division and from Eurostat over SDMX, each as a registered ExoDataSource and as a load_data() function for consumers that use pandas and have no Computer. Both emit the same dimensionality and units as IEA_EWEB under their own key tags, so a consumer can swap providers without its n and y dimensions changing shape. Add util.sdmx.fetch_data() for the part of the query that is specific to neither service. Neither aggregation nor interpolation runs unless asked for, and absent observations are never filled. The UNSD balance carries nine fuel groups against the IEA product axis of sixty-nine codes, so it serves aggregate indicators and cannot drive a technology calibration; the module docstring says so.
Wegatriespython
force-pushed
the
project/osce
branch
from
August 20, 2026 14:28
471243c to
2da1998
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #543 +/- ##
=======================================
+ Coverage 74.3% 74.5% +0.2%
=======================================
Files 323 327 +4
Lines 25850 26132 +282
=======================================
+ Hits 19207 19488 +281
- Misses 6643 6644 +1
🚀 New features to boost your workflow:
|
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.
Refiling of #539 This is a draft PR corresponding to the working branch for the osce-energy-resilience project. It adds support to fetch UNSD and EUROSTAT data to provide an alternative to IEA for energy balance data.
Add tools/unsd.py and tools/eurostat.py: national energy balances from the UN Statistics Division and from Eurostat over SDMX, each as a registered ExoDataSource and as a load_data() function for consumers that use pandas and have no Computer. Both emit the same dimensionality and units as IEA_EWEB under their own key tags, so a consumer can swap providers without its n and y dimensions changing shape.
Add util.sdmx.fetch_data() for the part of the query that is specific to neither service.
Neither aggregation nor interpolation runs unless asked for, and absent observations are never filled. The UNSD balance carries nine fuel groups against the IEA product axis of sixty-nine codes, so it serves aggregate indicators and cannot drive a technology calibration;
How to review
naPR checklist
- [ ] Continuous integration checks all ✅- [ ] Update doc/whatsnew.