No description
- Jupyter Notebook 92.8%
- Python 7.2%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
Dash-App zur Visualisierung der Bundestagswahlergebnisse 2025 in Leverkusen. Enthaelt: App-Code, Open-Data-CSVs (Stadt Leverkusen 05316000), Jupyter-Notebook, nginx- und systemd-Deployment-Konfigurationen. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> |
||
| app | ||
| deploy | ||
| .gitignore | ||
| BTW-25.ipynb | ||
| README.md | ||
| Wahlergebnisse_nach_Wahlbezirken.png | ||
Bundestagswahlergebnisse Leverkusen 2025
Interaktive Dash-Visualisierung der Bundestagswahlergebnisse 2025 in Leverkusen — Erst- und Zweitstimmen nach Kommunalwahlbezirk, Stadtteil und Stadtbezirk.
Features
- Erststimmen und Zweitstimmen nach Wahlbezirk, Stadtteil und Stadtbezirk
- Erststimmenanteile je Partei
- Interaktive Diagramme mit Plotly
- Filtermöglichkeit nach Wahlebene
Tech Stack
- Python 3, Dash, Plotly, scipy, pandas, dash_daq
- Deployment: gunicorn + nginx Reverse Proxy
- URL: https://btw-lev.nerd-department.de
Datenquelle
Open Data der Stadt Leverkusen (Gemeindeschlüssel 05316000) — Bundestagswahl 2025: https://www.offenedaten.de
Die CSV-Dateien liegen unter app/data/ und sind direkt vom Open-Data-Portal der Stadt bezogen.
Lokale Entwicklung
cd app/
python -m venv .venv
source .venv/bin/activate
pip install dash plotly pandas scipy dash_daq plotly-resampler
python app.py
Die App ist dann unter http://127.0.0.1:8050 erreichbar.
Deployment
Die App läuft als gunicorn-Prozess hinter nginx auf Port 5001.
WorkingDirectory: /var/www/html/btw-lev/
wsgi.py importiert server aus app.py als application.
Konfigurationsdateien im deploy/-Verzeichnis:
| Datei | Zweck |
|---|---|
deploy/nginx-btw-lev.conf |
nginx-vhost (HTTPS, Proxy auf Port 5001) |
deploy/gunicorn-btw-lev.service |
systemd-Service |
Update/Neustart
rsync -a app/ /var/www/html/btw-lev/
systemctl restart gunicorn-btw-lev
