Event-driven climate hazard monitoring pipeline for Tunisia's 24 governorates. AWS medallion architecture (Bronze/Silver/Gold) emulated locally with LocalStack. Detects heatwaves, dust storms, heavy rain and wind hazards from 5 years of Open-Meteo data. Built with Python, PostgreSQL, Streamlit.
# π‘οΈ Aero-Shield Tunisia
### Climate Hazard Monitoring & Early Warning System
> An event-driven data pipeline that monitors multi-dimensional climate hazards across all 24 Tunisian governorates β built on a real AWS medallion architecture, emulated locally for $0.
---
## π What Is This?
Tunisia faces real climate threats β extreme heat, Saharan dust storms, flash floods, dangerous winds. This project builds a complete data engineering system that:
- **Ingests** daily weather + air quality data for all 24 governorates from Open-Meteo
- **Transforms** raw data through a Bronze β Silver β Gold medallion pipeline
- **Detects** climate hazards using season-aware thresholds (35Β°C in Kebili in July β 35Β°C in Bizerte in January)
- **Alerts** authorities 24 hours in advance when forecasts exceed danger thresholds
- **Visualizes** everything on an interactive Tunisia choropleth heatmap
---
## ποΈ Architecture
```
Open-Meteo API (Historical + Forecast)
β
βΌ
ingestion/daily_ingest.py
β uploads raw JSON
βΌ
π₯ S3 tunisia-bronze ββββ S3 event βββββΊ β‘ Lambda (handler.py)
/YYYY/MM/DD/weather.json β
ββββββββββββββββΌβββββββββββββββ
βΌ βΌ βΌ
transform.py threshold_ notification
(validate + detector.py .py
clean) (hazards) (alerts)
β β
βΌ βΌ
π₯ S3 tunisia-silver π₯ PostgreSQL (Gold Layer)
/governorate=X/ βββ weather_observations
year=YYYY/month=MM/ βββ weather_forecasts
day=DD/data.parquet βββ hazard_alerts
βββ alert_thresholds
βββ pipeline_runs
β
βΌ
Streamlit Dashboard
βββ Tunisia choropleth map
βββ Metric selector (temp/rain/wind/dust)
βββ Historical (5 years) + Forecast (7 days)
βββ Real-time warnings table
```
### Why LocalStack?
LocalStack emulates AWS S3 and Lambda on your laptop β the code is **identical** to a real AWS deployment. Remove two lines (the LocalStack endpoint config) and this runs in production AW β¦