Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions examples/market_aggregates/market_aggregates_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ def main():
weighting="wind_capacity",
model_runs=[ModelRuns(Models.EPT2, [0, 1])],
max_lead_time=48,
debias=True,
)
print(f"MW dataset:\n{mw_data}")

Expand All @@ -137,6 +138,7 @@ def main():
weighting="solar_capacity",
model_runs=[ModelRuns(Models.EPT2, 0)],
max_lead_time=24,
debias=True,
)
print(f"Solar MW dataset:\n{solar_mw}")

Expand All @@ -150,6 +152,7 @@ def main():
weighting="population",
model_runs=[ModelRuns(Models.EPT2, 0)],
max_lead_time=48,
debias=True,
)
print(f"Load (demand) MW dataset:\n{load_mw}")

Expand Down
2 changes: 2 additions & 0 deletions examples/power_forecast/plot_day_ahead_timeseries.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ def plot_yearly_day_ahead(pf, zone: str) -> None:
time_zone="UTC",
start_date=start,
end_date=end,
debias=True,
)
df = _to_frame(ds)
if df is None or df.empty:
Expand Down Expand Up @@ -109,6 +110,7 @@ def plot_init_hour_comparison(pf, zone: str) -> None:
time_zone="UTC",
start_date=start,
end_date=end,
debias=True,
)
df = _to_frame(ds)
if df is None or df.empty:
Expand Down
1 change: 1 addition & 0 deletions examples/power_forecast/plot_power_forecast.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ def main():
"zone_keys": zones,
"init_time": ["latest-3", "latest-4"],
"max_prediction_timedelta": 4320,
"debias": True,
},
requires_auth=True,
)
Expand Down
7 changes: 7 additions & 0 deletions examples/power_forecast/power_forecast_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ def main():
init_time="latest",
max_prediction_timedelta=2880,
version=stable.model_version,
debias=True,
)
print(ds_pinned)
print()
Expand All @@ -77,6 +78,7 @@ def main():
init_time="latest",
max_prediction_timedelta=2880,
version="latest",
debias=True,
)
print(ds_latest)
print()
Expand All @@ -91,6 +93,7 @@ def main():
version_pins=[
{"zone_key": "DE", "psr_type": "Solar", "version": "latest"},
],
debias=True,
)
print(ds_pins)
print()
Expand All @@ -103,6 +106,7 @@ def main():
psr_types=["Solar"],
init_time="latest",
max_prediction_timedelta=2880,
debias=True,
)
print(ds)
print()
Expand All @@ -115,6 +119,7 @@ def main():
zone_keys=[zones[0]],
init_time=[0, 1],
max_prediction_timedelta=1440,
debias=True,
)
print(ds2)
print()
Expand All @@ -127,6 +132,7 @@ def main():
zone_keys=zones,
start_time=now.replace(hour=0, minute=0, second=0, microsecond=0),
end_time=now,
debias=True,
)
print(ds3)
print()
Expand All @@ -140,6 +146,7 @@ def main():
init_hour=9, # e.g. D-1 09:00
time_zone="UTC",
max_init_times=10, # stitch up to 10 matching days
debias=True,
)
print(ds4)

Expand Down
3 changes: 3 additions & 0 deletions src/jua/market_aggregates/energy_market.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,13 +284,15 @@ def compare_runs_mw(
... weighting="wind_capacity",
... model_runs=[ModelRuns(Models.EPT2, [0, 1])],
... max_lead_time=48,
... debias=True,
... )
>>>
>>> # Predicted electricity demand (load_mw)
>>> ds_load = germany.compare_runs_mw(
... weighting="population",
... model_runs=[ModelRuns(Models.EPT2, 0)],
... max_lead_time=48,
... debias=True,
... )
>>>
>>> # Daily mean MW data
Expand All @@ -301,6 +303,7 @@ def compare_runs_mw(
... temporal_aggregation=TemporalAggregation(
... AggregationFrequency.DAILY,
... ),
... debias=True,
... )
"""
attrs = {
Expand Down
10 changes: 10 additions & 0 deletions src/jua/power_forecast/power_forecast.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ class PowerForecast:
... psr_types=["Solar"],
... init_time="latest",
... max_prediction_timedelta=2880,
... debias=True,
... )
>>>
>>> # Same query against the packaged latest (preview) pointers
Expand All @@ -97,13 +98,15 @@ class PowerForecast:
... psr_types=["Solar"],
... init_time="latest",
... version="latest",
... debias=True,
... )
>>>
>>> # Time range mode
>>> ds = pf.get_data(
... zone_keys=["DE", "FR"],
... start_time=datetime(2025, 12, 1),
... end_time=datetime(2025, 12, 3),
... debias=True,
... )
"""

Expand Down Expand Up @@ -348,6 +351,7 @@ def get_versions(
... psr_types=["Solar"],
... init_time="latest",
... version=stable.model_version,
... debias=True,
... )
"""
params: dict = {}
Expand Down Expand Up @@ -461,6 +465,7 @@ def get_data(
... zone_keys=["DE"],
... psr_types=["Solar"],
... init_time="latest",
... debias=True,
... )
>>>
>>> # Preview / latest serving pointers
Expand All @@ -469,6 +474,7 @@ def get_data(
... psr_types=["Solar"],
... init_time="latest",
... version="latest",
... debias=True,
... )
>>>
>>> # Freeze today's stable run id (promote-safe)
Expand All @@ -481,6 +487,7 @@ def get_data(
... psr_types=["Solar"],
... init_time="latest",
... version=stable.model_version,
... debias=True,
... )
>>>
>>> # Mix aliases per cell
Expand All @@ -492,6 +499,7 @@ def get_data(
... version_pins=[
... {"zone_key": "DE", "psr_type": "Solar", "version": "latest"},
... ],
... debias=True,
... )
>>>
>>> # Time range query
Expand All @@ -500,6 +508,7 @@ def get_data(
... zone_keys=["DE"],
... start_time=datetime(2025, 12, 1),
... end_time=datetime(2025, 12, 3),
... debias=True,
... )
"""
has_horizon = init_time is not None or max_prediction_timedelta is not None
Expand Down Expand Up @@ -641,6 +650,7 @@ def get_day_ahead_timeseries(
... start_date=datetime(2026, 7, 1),
... end_date=datetime(2026, 7, 8),
... time_zone="Europe/Berlin",
... debias=True,
... )
"""
if not zone_keys or not isinstance(zone_keys, list):
Expand Down
Loading