Logo Lanfrica

kjdartaugust/flood-risk-ghana

Domain:

climatemobility

Record type:

software
Creator:
kjd
Host:
# FloodWatch Ghana 🌊 A production flood-risk platform for Ghana. Two combined features: 1. **Flood-risk scoring & mapping** β€” check a flood-risk score for any location/area in Ghana before buying land, building, living, or starting a business. Built from historical flood records, rainfall time-series, elevation/DEM, drainage/slope, land cover, and known Accra hotspots (Kaneshie, Circle, Adabraka, Alajo). 2. **Trotro route flood alerts** β€” combines the risk layer with live/forecast rainfall to predict which trotro routes flood before and during rain, and pushes route-level warnings to commuters. ## Architecture ``` β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” Open data ──ETL──▢│ PostGIS │◀── H3 hex scoring tiles (GPM/IMERG, β”‚ (Supabase) β”‚ SRTM DEM, β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜ Sentinel LC, β”‚ OSM roads) β”Œβ”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ FastAPI │◀────▢│ Redis β”‚ cache + rate limit ML model ────────▢│ (inference) β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ (logistic + β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜ gradient boost) β”‚ OpenAPI / JWT (Supabase Auth) β”Œβ”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β” β”‚ Next.js + β”‚ MapLibre GL interactive risk map β”‚ React β”‚ + trotro route alerts β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ ``` | Layer | Tech | |-----------|----------------------------------------------------------| | Frontend | Next.js 14 (App Router), React, MapLibre GL, TypeScript | | Backend | FastAPI, SQLAlchemy (async), Alembic, Pydantic v2 | | Data | Supabase Postgres + PostGIS, H3 hex index, Redis | | ML | scikit-learn (logistic baseline), LightGBM (upgrade) | | ETL | httpx workers, APScheduler cron (rainfall refresh) | | Infra | Docker Compose (local); Neon + Render + Vercel (deploy) | ## Quick start (local) ```bash cp .env.example .env # fill in Supabase + Mapbox/MapLibre keys docker compose up --build # postgis + redis + backend + worker + frontend # backend β†’ localhost …

Languages