feat: GB transmission/embedded wind split + demand (load) MW#81
Merged
Conversation
Expose GB-specific wind generation components from the UK-power feed: wind_embedded and wind_transmission, plus their day-ahead forecasts. The composite `wind`/`wind_forecast` totals remain available. The UK-power backend now splits requests into compatible batches so a composite total and its conflicting components are never sent in the same call, working around a backend 500 on such combinations, then reassembles the results transparently. Adds unit, functional, and example coverage for the new variables. Co-authored-by: Cursor <cursoragent@cursor.com>
Wire up population-weighted demand so `compare_runs_mw(weighting= "population")` returns predicted electricity demand as `load_mw`, and include `load` zones in `get_mw_zones` so callers can discover which markets support demand output. This exposes Jua-model load for many zones beyond Germany, derived from population-weighted forecasts. Updates docstrings, the market_aggregates example, and functional tests. Co-authored-by: Cursor <cursoragent@cursor.com>
MW responses carry a `market_zone` column with one row per zone and timestamp, so building the xarray Dataset on a (model_run, time) index raised "non-unique MultiIndex" when several zones were requested. Include `market_zone` in the index for MW responses; weather responses (no `market_zone` column) keep the (model_run, time) index. Co-authored-by: Cursor <cursoragent@cursor.com>
Requesting a PSR type a zone doesn't serve (e.g. Load for FR) previously failed with a cryptic "0 init time(s) available" error. get_data now validates requested PSR types per zone (cached psr-types lookup) and raises a clear error listing what the zone does serve. For demand (Load), the message points to the complementary Jua product: market_aggregates load_mw via the population weighting, available for many more zones. Co-authored-by: Cursor <cursoragent@cursor.com>
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.
Summary
Closes SDK feature-parity gaps with the Query Engine for power data:
market_data): exposeswind_embeddedandwind_transmission(and their day-ahead forecasts) from the UK-power feed, alongside the existing compositewind/wind_forecasttotals. The UK-power backend now splits requests into compatible batches so a composite total and its conflicting components are never sent in the same call (works around a backend 500), then reassembles results transparently.market_aggregates):compare_runs_mw(weighting="population")now returns predicted electricity demand asload_mw, andget_mw_zonesreportsloadzones. This surfaces Jua-model demand for many zones beyond Germany, derived from population-weighted forecasts.market_aggregates): building the xarray Dataset for MW responses now includesmarket_zonein the index, fixing a "non-unique MultiIndex" error when several zones are requested.power_forecast):get_datanow validates requested PSR types per zone (cached lookup). Requesting a type a zone doesn't serve (e.g.Loadfor FR/GB) used to fail with a cryptic "0 init time(s) available" error; it now raises a clear message listing the zone's available types, and for demand (Load) points to the complementary Jua product —market_aggregatesload_mwvia the population weighting. This keepsmarket_data(observational) cleanly separate; the only cross-reference is Jua→Jua.Commits
feat(market_data): add GB transmission/embedded wind splitfeat(market_aggregates): add demand (load) MW outputfix(market_aggregates): support multi-zone MW outputfeat(power_forecast): validate PSR types with actionable demand hintTest plan
tests/market_data) — passingtests/functional, live API) for market_data + market_aggregates + power_forecast — passingload_mw;get_mw_zonesincludesload; power_forecast Load→market_aggregates hint; unavailable PSR type lists availablemarket_data_example.py,plot_market_data.py,market_aggregates_example.py