refactor: modernize project and improve error handling and documentation
This commit is contained in:
parent
e27bf2a098
commit
d87d0cce11
17 changed files with 1793 additions and 188 deletions
64
README.md
Normal file
64
README.md
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
# Strompreis & Netz Pipeline
|
||||
|
||||
Automatisierte End-to-End Daten-Pipeline zur Erfassung, Analyse und Visualisierung von Strommarkt- und Wetterdaten.
|
||||
|
||||
## 🏗 Architektur (Medallion Prinzip)
|
||||
|
||||
Das Projekt folgt einer sauberen Data-Engineering-Struktur unter Verwendung von DuckDB und Polars:
|
||||
|
||||
1. **Bronze Layer (Raw):** Unveränderte API-Antworten von SMARD und Bright Sky werden als historische Fakten gespeichert.
|
||||
2. **Gold Layer (Combined):** Transformierte, bereinigte und über Zeitstempel zusammengeführte Daten (Inner Join), die direkt für Analysen und das Dashboard bereitstehen.
|
||||
|
||||
## 🚀 Features
|
||||
|
||||
- **Datensammlung:** Automatisiertes Abrufen von:
|
||||
- Strompreisen, Netzlast, Gesamterzeugung, Wind- & Solar-Erzeugung (SMARD API).
|
||||
- Umfassenden Wetterdaten (Temperatur, Wind, Solarstrahlung, etc. via Bright Sky API).
|
||||
- **Dashboard:** Interaktive Visualisierung mit Streamlit (Preise, Energiemix, Wetter-Details).
|
||||
- **REST-API:** FastAPI-Schnittstelle für den programmatischen Zugriff auf aktuelle Daten.
|
||||
- **Orchestrierung:** Vollständige Docker-Integration inklusive eines automatisierten Schedulers.
|
||||
|
||||
## 🛠 Installation & Betrieb
|
||||
|
||||
### Mit Docker (Empfohlen)
|
||||
|
||||
Das gesamte System (Pipeline, API, Dashboard) wird mit einem Befehl gestartet:
|
||||
|
||||
```bash
|
||||
docker-compose up --build
|
||||
```
|
||||
- **Dashboard:** `http://localhost:8501`
|
||||
- **API:** `http://localhost:8000/docs`
|
||||
|
||||
### Lokal (Entwicklung)
|
||||
|
||||
1. **Abhängigkeiten installieren:**
|
||||
```bash
|
||||
uv sync
|
||||
```
|
||||
|
||||
2. **Pipeline manuell ausführen:**
|
||||
```bash
|
||||
uv run python main.py run
|
||||
```
|
||||
|
||||
3. **Dashboard starten:**
|
||||
```bash
|
||||
uv run streamlit run dashboard/app.py
|
||||
```
|
||||
|
||||
## ⚙️ Konfiguration
|
||||
|
||||
Die Konfiguration erfolgt über `config/config.yaml` oder Umgebungsvariablen mit dem Präfix `STROM_`:
|
||||
- `STROM_SMARD__REGION`: Region-Code (Standard: DE-LU)
|
||||
- `STROM_DATABASE__PATH`: Pfad zur DuckDB Datei
|
||||
- `INTERVAL`: Ausführungsintervall des Schedulers im Docker-Container (in Sekunden).
|
||||
|
||||
## 🧪 Tests
|
||||
|
||||
```bash
|
||||
uv run pytest
|
||||
```
|
||||
|
||||
## Lizenz
|
||||
MIT
|
||||
Loading…
Add table
Add a link
Reference in a new issue