Skip to content

Add BESS income-by-Bundesland snapshot script#1

Open
MaykThewessen wants to merge 1 commit into
mainfrom
claude/german-battery-income-analysis-p1EIA
Open

Add BESS income-by-Bundesland snapshot script#1
MaykThewessen wants to merge 1 commit into
mainfrom
claude/german-battery-income-analysis-p1EIA

Conversation

@MaykThewessen
Copy link
Copy Markdown
Owner

Summary

New standalone script bess_income_by_bundesland.py that aggregates German battery storage capacity to the 16 federal states at a configurable snapshot date and applies a €/MW/yr revenue benchmark for an annual-income estimate.

  • Snapshot: defaults to 2026-02-28 (live BESS units only — commissioned ≤ snapshot, not decommissioned)
  • Benchmark: defaults to 130 k€/MW/yr — near the Modo Energy German BESS Index median for 2024-25 (2-h system arbitrage + aFRR). Override with --benchmark.
  • Filter: defaults to storage_technology == "Batterie" (excludes PSH / H₂ / flywheels / CAES). --include-non-battery adds them.
  • Geo: Bundesland polygons fetched from the geoBoundaries API (ADM1, DEU) and cached under data/geo/ (gitignored). Used to spatially recover the ~30 rows where MaStR has Bundesland NULL but coordinates are present.
  • Output: stdout table sorted by estimated income, with totals.

Data source priority: open-mastr SQLite if present, else the bundled Zenodo parquet BNetzA_MaStR/storage.parquet.

Sample output (Feb 2026, batteries only, 130 k€/MW/yr)

TOTAL                    1,731,870    12,732.1     19,158.6                 1,655.2

Bayern, NRW, Baden-Württemberg lead; Bremen / Hamburg / Berlin at the bottom. Three rows fall through both the MaStR Bundesland field and the spatial join (no coords, no label) — 0 MW impact.

Test plan

  • Runs end-to-end against the Zenodo parquet
  • CLI flags --benchmark, --snapshot, --include-non-battery all work
  • Spatial fill recovers 30/33 NA-bundesland rows; 3 remain (no coords)
  • Totals reconcile with MaStR live count (1.73 M battery units, ~12.7 GW)
  • Run against the open-mastr SQLite snapshot when DB is present

Generated by Claude Code

Aggregates installed battery power/energy to the 16 German federal states
at a configurable snapshot date (default 2026-02-28) and applies a
€/MW/yr revenue benchmark (default 130 k€, near Modo Energy index median)
for an order-of-magnitude annual-income estimate per state.

Bundesland polygons fetched from the geoBoundaries ADM1 API and cached
under data/geo/ (gitignored); used to spatially recover the few rows
where MaStR has Bundesland NULL but coordinates are present.
@MaykThewessen MaykThewessen marked this pull request as ready for review May 23, 2026 21:00
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