End-to-end weather analytics pipeline built for portfolio purposes: it orchestrates daily and historical ingestion of weather data from the free Open-Meteo API using Prefect, lands it through a raw → staging → mart layered structure on SeaweedFS (self-hosted, S3-compatible object storage), queries the final layer directly with DuckDB's httpfs (no local copy of the data), and visualizes multi-city trends in a Streamlit dashboard.
Storage layout:
s3://weather-bucket/
├── raw/openmeteo/city=<city>/dt=YYYY-MM-DD/data.parquet
├── staging/weather/dt=YYYY-MM-DD/data.parquet
└── mart/weather/dt=YYYY-MM-DD/data.parquet
├── common/ # shared config, DuckDB connection, S3/SeaweedFS storage helpers
├── pipeline/
│ ├── tasks/ # extract (Open-Meteo), transform, load — no Prefect dependency
│ └── flows/ # Prefect flows (weather_flow, backfill_flow) + shared task wrappers
├── dashboard/ # Streamlit app querying mart/ via DuckDB httpfs
├── scripts/ # standalone scripts (bucket init)
├── docs/
│ └── screenshots/ # dashboard screenshots (black/, white/ themes)
└── tests/ # pytest unit tests for extract/transform/storage, API/S3 mocked
- Copy
.env.exampleto.envand fill in every value — there are no built-in defaults, and the app fails fast if a variable is missing. docker compose up -d --build— brings up SeaweedFS (master, volume, filer, s3 gateway on:8333), the Prefect server/UI (:4200), builds theappimage, creates the bucket (bucket-init, idempotent), registers deployments (deploymentsservice, see below), then starts the Streamlit dashboard on:8501.
docker compose run --rm app python -m pipeline.flows.weather_flow
Runs the Prefect flow directly for yesterday's date (forecast API), with retries on the extract step — bypasses the UI/deployment, useful for local debugging.
Trigger the weather-backfill deployment from the Prefect UI (http://localhost:4200) and set start_date / end_date (YYYY-MM-DD) as run parameters. It loops over CITIES × the date range, pulling from the Open-Meteo Archive API and writing through raw/ → staging/ → mart/, with full Prefect task tracking and retries.
Available at http://localhost:4200 — trigger and schedule deployments, and see flow runs, task runs, logs, and state history for every run (backed by a persistent prefect-server service, not the ephemeral local server Prefect falls back to when no server is configured).
Already running at http://localhost:8501 once docker compose up -d --build finishes. Shows a temperature heatmap by city, precipitation comparison by city, and summary stats — all queried live from mart/ via DuckDB's httpfs.
Dashboard screenshot for reference:
After changing dashboard/app.py, rebuild and restart just that service:
docker compose up -d --build app
No need to bring the rest of the stack down — SeaweedFS, Prefect server, and the deployments service keep running, and existing data is untouched.
- Create and activate a virtual environment:
python -m venv .venv .venv\Scripts\Activate.ps1 - Install dependencies:
pip install -r requirements-dev.txt - Make sure
.envexists (see Setup) — tests read their config from it, there are no test-only defaults. - Run the tests:
pytest
Unit tests cover extract, transform, and storage, with the API/S3 calls mocked.
docker compose down
Use docker compose down -v to also remove everything, including SeaweedFS and Prefect server data.


