Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
3d37560
Add design spec for msr_wind open-mastr refactoring
Apr 2, 2026
d4f0777
Update design spec: all energy types, rename to mastr.db
Apr 5, 2026
0acb111
Add implementation plan for MaStR open-mastr refactoring
Apr 10, 2026
ed362ec
feat: add MaStR scraper using open-mastr bulk download (isolated venv)
Apr 10, 2026
aa1f063
feat: add wind processor with daily expansion calculation
Apr 10, 2026
5eb2a89
feat: integrate MaStR scraper+processor with S3 and subprocess
Apr 10, 2026
3d2a5be
refactor: update documentation for new MaStR architecture
Apr 10, 2026
8f91ad0
chore: add .gitignore for MaStR database files
Apr 10, 2026
2d2e7ae
fix: handle mixed NaN/string types in shutdown date computation
Apr 10, 2026
80dea6f
fix: use WindAnLandOderAufSee column instead of Lage for wind location
Apr 10, 2026
c597db9
refactor: upload only results CSV instead of 4.1GB database
Apr 11, 2026
0c014b6
feat: add monthly and yearly wind capacity summaries
Apr 11, 2026
2e07841
feat: add solar processor with daily/monthly/yearly expansion data
Apr 12, 2026
8eb4162
feat: move mastr.db to local_storage, add S3 sync and progress
Apr 13, 2026
6816694
feat: skip MaStR download if DB already has today's data
Apr 13, 2026
c7a3092
refactor: remove S3 download of mastr.db, keep upload only
Apr 13, 2026
6a3866a
feat: add Datawrapper display script for wind/solar charts
Apr 13, 2026
4515c48
refactor: switch DW charts to monthly data, separate wind/solar zubau
Apr 13, 2026
10009d1
feat: add YEARLY_AGGREGATES toggle for DW chart granularity
Apr 13, 2026
0d7cf3a
fix: parse only last line of scraper stdout as JSON
Apr 13, 2026
b15dc7a
klimadashboard Commit
Apr 13, 2026
05d06bd
docs: update README with complete architecture
Apr 13, 2026
1287427
README auf Stand
Apr 13, 2026
92e21c6
fix: add timestamp to DW notes, use correct metadata path
Apr 13, 2026
eb6df1c
Fix: Aktualisierungsdatum
Apr 13, 2026
3abecac
🔀 Merge branch 'main' into feature/klimadashboard
jh0ker Apr 13, 2026
5649137
refactor: run scraper in main venv instead of isolated subprocess
Apr 13, 2026
0fe566c
Aktualisiert auf pandas 2.3, ohne venv für Scraper
Apr 13, 2026
cd25241
🔀 Merge branch 'main' into feature/klimadashboard
jh0ker Apr 14, 2026
27ca7e3
⬆️ Re-lock for Python 3.13
jh0ker Apr 14, 2026
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
2 changes: 2 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ jobs:
TALSPERREN_DATAWRAPPER_TOKEN: ${{ secrets.NASA_WALDBRANDDATEN_RHODOS_DATAWRAPPER_TOKEN }}
DB_CLIENT_ID: ${{ secrets.DB_CLIENT_ID }}
DB_API_KEY: ${{ secrets.DB_API_KEY }}
# Datawrapper key for Jan Eggers' account
DW_API_KEY_JE: ${{ secrets.DW_API_KEY_JE }}

- name: Log artifact sizes
run: |
Expand Down
3 changes: 2 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"recommendations": [
"charliermarsh.ruff",
"ms-python.python",
"ms-python.vscode-pylance"
"ms-python.vscode-pylance",
"continue.continue"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Braucht es das für irgendwas?

]
}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ Find the scraper you created in the `ddj_cloud/scrapers` folder and open the `.p
You can run the following command to test your scraper:

uv run manage test <scraper_name>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

?

where `<scraper_name>` is the Python module name of your scraper.

If a local `.env` file exists in the repository root, `manage test` will load it automatically before importing the scraper.
Expand Down
13 changes: 13 additions & 0 deletions ddj_cloud/scrapers/klimadashboard/.claude/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"permissions": {
"allow": [
"WebFetch(domain:github.com)",
"WebFetch(domain:raw.githubusercontent.com)",
"Read(//Users/janeggers/Code/wdr-ddj-cloud/ddj_cloud/scrapers/talsperren/**)",
"WebFetch(domain:open-mastr.readthedocs.io)",
"WebFetch(domain:api.github.com)",
"Read(//Users/janeggers/miniconda3/lib/python3.12/site-packages/open_mastr/**)",
"Read(//Users/janeggers/Code/wdr-ddj-cloud/**)"
Comment on lines +6 to +10
Copy link

Copilot AI Apr 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Diese Datei enthält machine-spezifische absolute Pfade (/Users/...) und lokale Read-Permissions, die für andere Entwickler/CI nicht gültig sind und unnötig repo-spezifische Details einchecken. Bitte die Settings auf repo-relative/portable Pfade reduzieren oder die Datei aus dem Repo entfernen.

Suggested change
"Read(//Users/janeggers/Code/wdr-ddj-cloud/ddj_cloud/scrapers/talsperren/**)",
"WebFetch(domain:open-mastr.readthedocs.io)",
"WebFetch(domain:api.github.com)",
"Read(//Users/janeggers/miniconda3/lib/python3.12/site-packages/open_mastr/**)",
"Read(//Users/janeggers/Code/wdr-ddj-cloud/**)"
"Read(ddj_cloud/scrapers/talsperren/**)",
"WebFetch(domain:open-mastr.readthedocs.io)",
"WebFetch(domain:api.github.com)",
"Read(ddj_cloud/**)"

Copilot uses AI. Check for mistakes.
]
}
}
14 changes: 14 additions & 0 deletions ddj_cloud/scrapers/klimadashboard/.copier-answers.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Changes here will be overwritten by Copier; NEVER EDIT MANUALLY
_src_path: /Users/janeggers/Code/wdr-ddj-cloud/scraper_template
Comment thread
jh0ker marked this conversation as resolved.
contact_email: jan.eggers@fm.wdr.de
contact_name: Jan Eggers
description: 'Automation für Quarks.de: Ausbau von Wind- und Solarenergie, Energiemix
in D und mehr

'
display_name: klimadashboard
ephemeral_storage: '512'
interval: daily
memory_size: '1024'
preset: pandas

2 changes: 2 additions & 0 deletions ddj_cloud/scrapers/klimadashboard/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# MaStR databases
*.db
52 changes: 52 additions & 0 deletions ddj_cloud/scrapers/klimadashboard/CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Technology stack

- Python 3.11
- uv
- Datawrapper (Charts)
- SQLite Database (MaStR-Daten)
- Fraunhofer Energy Charts API (Energiemix)
- MaStR SOAP API (Windkraft-Ausbau)
Copy link

Copilot AI Apr 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In der Tech-Stack-Liste steht noch „MaStR SOAP API (Windkraft-Ausbau)“, aber der aktuelle Scraper nutzt open-mastr (Bulk-Download) und keinen SOAP-Zugriff mehr. Bitte die Datei aktualisieren, damit Architektur/Abhängigkeiten nicht irreführend dokumentiert sind.

Suggested change
- MaStR SOAP API (Windkraft-Ausbau)
- open-mastr (Bulk-Download für Windkraft-Ausbau)

Copilot uses AI. Check for mistakes.
- Sentry (Monitoring)

## Step 1: POC Datawrapper -- DONE

- Look at src/energiemix.py which is a crude sample of a gather-process-store-publish pipeline
- Look for errors and improve the code

### Findings & Fixes (2026-03-30)

7 bugs fixed in `src/energiemix.py`:
1. `MIX_NOTES` was defined twice, shadowing `POWER_NOTES` -> renamed second to `POWER_NOTES`
2. `fetch_public_power()` called wrong API endpoint (`SHARE_FORECAST` instead of `PUBLIC_POWER`)
3. `upload_to_datawrapper()` used undefined `DATAWRAPPER_CHART_ID` -> changed to `dw_id` param
4. Column selection used tuple syntax instead of list (`df["a", "b"]` -> `df[["a", "b"]]`)
5. `POWER_NOTES` was undefined because of bug #1
6. Raw DataFrame passed to `upload_to_datawrapper` instead of CSV -> added `build_csv_from_index()`
7. Returned CSV string but caller expected DataFrame -> now returns `df_combined`

## Step 2: PHP to Python -- DONE

- Look at the msr_php subfolder containing PHP scripts to scrape and process wind data
- Construct a Python version of it "msr_wind.py", analog to the src/energiemix.py
- Document in README_msr.md, noting all secrets and keys needed
- Suggest msr_solar.py for solar energy

### Findings (2026-03-30)

Created `src/msr_wind.py` porting `msr_php/wka_daily.php` + `msr_php/wka_to_data.php`:
- Uses SQLite instead of MySQL, requests instead of PHP SoapClient, pandas instead of per-row SQL
- `fetch_recent_units()`: fetches new/updated wind units from MaStR API
- `process_daily_data()`: calculates daily capacity (installed, planned, required for 2030 targets)
- Documented all secrets in `README_msr.md`
- Solar suggestion included in README_msr.md (energietraeger: "Solare Strahlungsenergie", 215 GW target)

## Step 3: Add monitoring -- DONE

- Look at the ../../utils to understand sentry
- Add useful sentry functions

### Findings (2026-03-30)

Added `sentry_sdk.capture_exception(e)` to all API calls in both files:
- `energiemix.py`: all 4 Fraunhofer API fetch functions
- `msr_wind.py`: SOAP API call + per-unit error handling (individual failures don't crash the run)
112 changes: 112 additions & 0 deletions ddj_cloud/scrapers/klimadashboard/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
# klimadashboard

**Contact:** Jan Eggers (jan.eggers@fm.wdr.de)

Automation für Quarks.de: Ausbau von Wind- und Solarenergie, Energiemix in D und mehr

## Architektur

```
klimadashboard.py (Orchestrator)
├── msr_scraper.py → alle Energiearten aus MaStR (isoliertes venv via uv run)
├── msr_wind_processor.py → Wind-Tagesdaten berechnen
├── msr_solar_processor.py → Solar-Tagesdaten berechnen
├── msr_dw_display.py → Datawrapper-Charts aktualisieren
├── S3: upload mastr.db + CSVs
└── energiemix.py → Fraunhofer-Daten + DW-Charts
```


## MaStR-Scraper; Auswertung Wind- und Solarenergie

Ausbaustand Wind- und Solarenenergie: Wie geht es voran? Was muss passieren, um die Ziele des EEG zu erreichen?

Ursprünglich ein Python-Port der PHP-Skripte `msr_php/wka_daily.php` und `msr_php/wka_to_data.php`, jetzt basierend auf der [open-mastr](https://github.com/OpenEnergyPlatform/open-mastr)-Bibliothek des [Rainer-Lemoine-Instituts](https://wam.rl-institut.de/#showcase). Die Maintainer dort sind Jonathan Amme und Ludwig Hülk - die das mehr oder weniger nebenbei entwickeln und für Props und Kooperationen offen sind.


### 1. Scraper (`src/msr_scraper.py`)

Lädt alle Energiearten (Wind, Solar, Biomasse, Wasser, Kernkraft, Verbrennung, Geothermie/Grubengas, Speicher)
über den open-mastr Bulk-Download und speichert sie in `mastr.db`.

**Kein API-Key nötig** -- nutzt die öffentlichen Bulk-Daten des MaStR.

**Isoliertes venv:** Der Scraper nutzt PEP 723 inline script metadata und wird via `uv run`
in einem eigenen virtuellen Environment ausgeführt (open-mastr benötigt pandas>=2.2,
das Hauptprojekt nutzt pandas~=1.5).

Comment on lines +35 to +38
Copy link

Copilot AI Apr 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Der Abschnitt zum „isolierten venv via PEP 723 / pandas~=1.5“ passt nicht zum aktuellen Repo: pyproject.toml pinnt pandas auf ~=2.3 und src/msr_scraper.py enthält keine PEP-723 Inline-Metadaten. Bitte diese Aussagen entfernen/aktualisieren, damit Build/Deployment-Erwartungen korrekt sind.

Copilot uses AI. Check for mistakes.
**Caching:** Wenn `mastr.db` bereits Daten von heute enthält (`DatumDownload`), wird der Download übersprungen.

### 2. Wind-Prozessor (`src/msr_wind_processor.py`)

Berechnet tägliche Ausbaudaten (2010-2030) für Onshore und Offshore Wind:
- Kumulierte installierte Leistung (GW)
- Täglicher Zubau/Abbau (MW)
- Geplante zukünftige Installationen
- Nötiger täglicher Ausbau für die Klimaschutzziele 2030
- Monatliche und jährliche Zusammenfassungen

**Klimaziele 2030:**
- Onshore: 115 GW (Wind-an-Land-Gesetz, seit 01.02.2023)
- Offshore: 30 GW (Wind-auf-See-Gesetz, seit 01.01.2023)

### 3. Solar-Prozessor (`src/msr_solar_processor.py`)

Berechnet tägliche Ausbaudaten (2010-2030) für Solarenergie:
- Kumulierte installierte Leistung (GW)
- Täglicher Zubau/Abbau (MW)
- Geplante zukünftige Installationen
- Nötiger täglicher Ausbau für das Klimaziel 2030
- Monatliche und jährliche Zusammenfassungen

**Klimaziel 2030:** 215 GW (EEG 2023)

### 4. Datawrapper-Display (`src/msr_dw_display.py`)

Lädt aufbereitete Daten in Datawrapper-Charts hoch:
- **Wind-Ausbau** (`EgOti`): Gesamtleistung Onshore/Offshore
- **Solar-Ausbau** (`1rxLQ`): Gesamtleistung Solar
- **Wind-Zubau** (`7yMTK`): Zubau pro Monat/Jahr
- **Solar-Zubau** (`kPzGf`): Zubau pro Monat/Jahr

Umschaltbar zwischen monatlicher und jährlicher Aggregation via `YEARLY_AGGREGATES`.

## Benötigte Secrets / Umgebungsvariablen

| Variable | Beschreibung | Wo? |
|----------|-------------|-----|
| `DATAWRAPPER_API_KEY` | API-Token für Datawrapper-Charts | [Datawrapper Account Settings](https://app.datawrapper.de/account/api-tokens), in .env des Projekts |
Copy link

Copilot AI Apr 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Die Doku nennt DATAWRAPPER_API_KEY, aber der Scraper-Code (energiemix/msr_dw_display) und die Deploy-Config erwarten DW_API_KEY_JE. Bitte README anpassen, damit die benötigte Umgebungsvariable eindeutig und konsistent ist.

Suggested change
| `DATAWRAPPER_API_KEY` | API-Token für Datawrapper-Charts | [Datawrapper Account Settings](https://app.datawrapper.de/account/api-tokens), in .env des Projekts |
| `DW_API_KEY_JE` | API-Token für Datawrapper-Charts; diese Umgebungsvariable wird von den Skripten und der Deploy-Konfiguration erwartet | [Datawrapper Account Settings](https://app.datawrapper.de/account/api-tokens), in `.env` des Projekts |

Copilot uses AI. Check for mistakes.

Der Upload ins S3-Bucket erfolgt über eine Bibliotheksfunktion des Projekts; keine Extra-Keys nötig.

## Datenbank

Die SQLite-Datenbank `mastr.db` liegt in `local_storage/klimadashboard/` und wird nach Verarbeitung auf S3 hochgeladen.

**Tabellen aus MaStR** (open-mastr-Schema):
- `wind_extended`, `solar_extended`, `biomass_extended`, `hydro_extended`,
`combustion_extended`, `nuclear_extended`, `gsgk_extended`, `storage_extended`

**Berechnete Tabellen:**
- `ee_wind_taeglich`: Tägliche Wind-Ausbaudaten pro Lage (onshore/offshore)
- `ee_solar_taeglich`: Tägliche Solar-Ausbaudaten

## Erweiterbarkeit

Weitere Prozessoren können hinzugefügt werden, die auf denselben Daten in `mastr.db` arbeiten:
- `msr_biomasse_processor.py`
- `energiemix_processor.py` (ersetzt energiemix.py mit den Fraunhofer-Daten; erzeugt aktuelle Verlaufsdaten zum Energiemix)

## Energiemix (`src/energiemix.py`)

Monolithischer Scraper, der Daten des [Fraunhofer ISE](https://www.energy-charts.info/?l=de&c=DE) über die API holt, aufarbeitet und auf zwei Datawrapper-Grafiken schiebt.

- **Chart "Erneuerbare-Anteil"** (`n3FOA`): Monatsmittel + Jahresdurchschnitte, 10 Jahre
- **Chart "Installierte Leistung"** (`p5sHV`): Kapazitäten nach Energieträger

**Weshalb nicht aus dem MaStR?** Dort findet sich die *installierte* Leistung; was aus dieser Kapazität tatsächlich herauskommt, kann man erst im Nachhinein sagen - bzw. mit Modellen und unter Zuhilfenahme anderer Quellen ergänzen. Das tut die Fraunhofer-Plattform.

## Einstiegspunkt

`klimadashboard.py` wird vom zentralen Handler aufgerufen und orchestriert die einzelnen Module.
Empty file.
73 changes: 73 additions & 0 deletions ddj_cloud/scrapers/klimadashboard/klimadashboard.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
from pathlib import Path

import pandas as pd

from ddj_cloud.scrapers.klimadashboard.src.energiemix import update_energiemix
from ddj_cloud.scrapers.klimadashboard.src.msr_dw_display import upload_all as upload_dw_charts
from ddj_cloud.scrapers.klimadashboard.src.msr_scraper import scrape_mastr
from ddj_cloud.scrapers.klimadashboard.src.msr_solar_processor import process_solar
from ddj_cloud.scrapers.klimadashboard.src.msr_wind_processor import process_wind
from ddj_cloud.utils.storage import (
upload_dataframe,
upload_file,
)

VERSION_STRING = "V0.05 vom 13.04.2026"

# mastr.db in local_storage (analog zu anderen Scrapern)
DB_LOCAL_PATH = Path(__file__).parent.parent.parent.parent / "local_storage" / "klimadashboard" / "mastr.db"
DB_S3_KEY = "klimadashboard/mastr.db"

Comment on lines +17 to +20
Copy link

Copilot AI Apr 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DB_LOCAL_PATH zeigt auf <repo>/local_storage/.... In AWS Lambda ist das Deployment-Paket i.d.R. read-only; Schreibzugriffe auf diesen Pfad würden fehlschlagen. Bitte DB unter /tmp ablegen (oder rein in-memory arbeiten) und idealerweise zu Beginn mastr.db von S3 herunterladen, damit das Caching über DatumDownload überhaupt wirken kann.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also da sind glaub ich beide KIs verwirrt.

local_storage sollte im Code tatsächlich eher nicht referenziert werden. Dabei geht es ja nur um eine Emulation des S3-Storages während man lokal testet/entwickelt. Solange du mit dem ddj_cloud.utils.storage Modul arbeitest, entscheidet das ja für dich, ob die Daten gerade von/nach S3 oder local_storage geladen werden.

Aber darüber, wie die Datenbanken jongliert werden, sollten wir noch mal reden.


def _upload_db():
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Diese Funktion ist momentan wirklich geil sinnbefreit 😄 Es lädt die DB aus DB_LOCAL_PATH in den RAM und schreibt das dann an genau die selbe Stelle wieder neu hin.

"""Lädt mastr.db auf S3 hoch."""
if not DB_LOCAL_PATH.exists():
print(" Warnung: mastr.db nicht gefunden, Upload übersprungen.")
return
upload_file(
DB_LOCAL_PATH.read_bytes(),
DB_S3_KEY,
archive=False,
)
size_mb = DB_LOCAL_PATH.stat().st_size / 1024 / 1024
print(f" mastr.db auf S3 hochgeladen ({size_mb:.1f} MB)")


def run():
# Energiemix (Fraunhofer API)
df = update_energiemix()
upload_dataframe(df, "klimadashboard/test_energiemix1.csv")

Comment on lines +37 to +40
Copy link

Copilot AI Apr 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Der Upload-Pfad klimadashboard/test_energiemix1.csv wirkt wie ein Test-Artefakt und könnte in Produktion dauerhaft liegen bleiben. Bitte auf einen stabilen, sprechenden Key umstellen oder entfernen, falls nicht benötigt.

Copilot uses AI. Check for mistakes.
# MaStR: Scraper, Prozessoren, DB auf S3
print("MaStR-Daten aktualisieren...")
DB_LOCAL_PATH.parent.mkdir(parents=True, exist_ok=True)
counts = scrape_mastr(DB_LOCAL_PATH)
total = sum(counts.values())
print(f" MaStR-Scraper: {total} Einheiten geladen")

# Wind
print("Wind-Daten verarbeiten...")
df_onshore, df_offshore, wind_summaries = process_wind(DB_LOCAL_PATH)
df_wind = pd.concat([df_onshore, df_offshore], ignore_index=True)
upload_dataframe(df_wind, "klimadashboard/wind_taeglich.csv")
for name, df_summary in wind_summaries.items():
upload_dataframe(df_summary, f"klimadashboard/wind_{name}.csv")

# Solar
print("Solar-Daten verarbeiten...")
df_solar, solar_summaries = process_solar(DB_LOCAL_PATH)
upload_dataframe(df_solar, "klimadashboard/solar_taeglich.csv")
for name, df_summary in solar_summaries.items():
upload_dataframe(df_summary, f"klimadashboard/solar_{name}.csv")

# Datawrapper-Charts aktualisieren
print("Datawrapper-Charts aktualisieren...")
upload_dw_charts(
wind_summaries=wind_summaries,
solar_summaries=solar_summaries,
)

# DB auf S3 hochladen
_upload_db()

print("MaStR-Daten aktualisiert.")
Binary file not shown.
85 changes: 85 additions & 0 deletions ddj_cloud/scrapers/klimadashboard/msr_php/Tabellenstrukturen.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
--
-- Tabellenstruktur für Tabelle `ee_wind`
-- (Tabelle mit allen WKA-Anlagen)
--

CREATE TABLE `ee_wind` (
`mastrnr_einheit` varchar(32) NOT NULL,
`name_einheit` text DEFAULT NULL,
`betriebsstatus` text DEFAULT NULL,
`bruttoleistung` decimal(10,1) DEFAULT NULL,
`nettonennleistung` decimal(10,1) DEFAULT NULL,
`datum_inbetriebnahme` date DEFAULT NULL,
`datum_registrierung` date DEFAULT NULL,
`bundesland` text DEFAULT NULL,
`landkreis` mediumtext DEFAULT NULL,
`gemeinde` mediumtext DEFAULT NULL,
`plz` mediumtext DEFAULT NULL,
`ort` mediumtext DEFAULT NULL,
`strasse` mediumtext DEFAULT NULL,
`hausnummer` mediumtext DEFAULT NULL,
`gemarkung` mediumtext DEFAULT NULL,
`flurstueck` mediumtext DEFAULT NULL,
`gemeindeschluessel` int(11) DEFAULT NULL,
`breitengrad` decimal(10,6) DEFAULT NULL,
`laengengrad` decimal(10,6) DEFAULT NULL,
`name_windpark` mediumtext DEFAULT NULL,
`nabenhoehe` decimal(10,2) DEFAULT NULL,
`rotordurchmesser` decimal(10,2) DEFAULT NULL,
`hersteller_windanlage` mediumtext DEFAULT NULL,
`typenbezeichnung` mediumtext DEFAULT NULL,
`technologie` mediumtext DEFAULT NULL,
`lage_einheit` mediumtext DEFAULT NULL,
`letzte_aktualisierung` date DEFAULT NULL,
`datum_stilllegung` date DEFAULT NULL,
`datum_geplante_inbetriebnahme` date DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;

--
-- Indizes für die Tabelle `ee_wind`
--
ALTER TABLE `ee_wind`
ADD KEY `idx_lage_einheit` (`lage_einheit`(17)),
ADD KEY `idx_betriebsstatus` (`betriebsstatus`(25)),
ADD KEY `idx_datum_inbetriebnahme` (`datum_inbetriebnahme`),
ADD KEY `idx_datum_stilllegung` (`datum_stilllegung`),
ADD KEY `idx_datum_geplante_inbetriebnahme` (`datum_geplante_inbetriebnahme`),
ADD KEY `idx_lage_status_datum_inbetriebnahme` (`lage_einheit`(17),`betriebsstatus`(25),`datum_inbetriebnahme`),
ADD KEY `idx_lage_status_datum_stilllegung` (`lage_einheit`(17),`betriebsstatus`(25),`datum_stilllegung`),
ADD KEY `idx_lage_status_datum_geplante_inbetriebnahme` (`lage_einheit`(17),`betriebsstatus`(25),`datum_geplante_inbetriebnahme`),
ADD KEY `idx_mastrnr` (`mastrnr_einheit`);
COMMIT;


-------------------------------------------------------------------------------


--
-- Tabellenstruktur für Tabelle `ee_wind_taeglich`
-- (Tabelle, aus denen ich meine Ausgaben an die Diagramme generiere: Zeitliche Verläufe etc.)
--

CREATE TABLE `ee_wind_taeglich` (
`datum` date NOT NULL,
`lage_einheit` text NOT NULL,
`installiert_gesamt` text NOT NULL,
`installiert_taeglich` text NOT NULL,
`geplant_gesamt` text NOT NULL,
`geplant_taeglich` text NOT NULL,
`noetig_gesamt` text NOT NULL,
`noetig_taeglich` text NOT NULL,
`stand` date NOT NULL,
`installiert_taeglich_wert` float NOT NULL,
`geplant_taeglich_wert` float NOT NULL,
`noetig_taeglich_wert` float NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_bin;


--
-- Indizes für die Tabelle `ee_wind_taeglich`
--
ALTER TABLE `ee_wind_taeglich`
ADD KEY `idx_datum` (`datum`),
ADD KEY `idx_lage_einheit` (`lage_einheit`(17));
COMMIT;

Loading
Loading