How pharelouindou/bam works
BeninAquaMap (BAM) collects environmental and satellite observations, scores water/soil suitability, and stores site and national-grid results in PostgreSQL. Its main workflows are the site pipeline and a department-oriented grid workflow, which adds commune mapping, terrain/soil/weather enrichment, satellite analysis, and daily history. The repository also includes an API and a Grafana dashboard. Connections below are limited to README statements and source-index references or excerpts; some API and presentation wiring is not shown.
Main entry points: main.py Site pipeline · enrichir_grille.py Grid enrichment · analyser_grille.py Grid satellite analysis · connexion.py Database access
Components 22
Collection workflows
- Site pipeline
main.py - Department flow
bam_pipeline.py - Grid enrichment
process/enrichir_grille.py - Grid satellite analysis
process/analyser_grille.py
Environmental observations
- Weather data
collect/meteo.py - Soil data
collect/sol.py - CHIRPS rainfall
collect/chirps.py - GPM rainfall
collect/noaa.py - Elevation data
collect/srtm.py - NASA satellite indices
collect/nasa.py - Sentinel-2 indices
collect/gee_sentinel.py
Geospatial analysis
- Suitability scoring
process/scoring.py - Benin boundaries
process/benin_frontiere.py - Grid generation
process/quadrillage.py - Commune enrichment
process/enrichir_communes_geojson.py
Persistence and history
- Database access
db/connexion.py - PostgreSQL
- Daily grid history
process/historique_grille.py
Access and visualization
- HTTP API
api/app.py - Grafana dashboard
docker/grafana/dashboards/bam-grille-alibori.json
Other components
- Operator
- Google Earth Engine
Connections 29
- Operator → Site pipeline: runs
README.md - Operator → Department flow: runs
bam_pipeline.py - Department flow → Commune enrichment: runs per department
bam_pipeline.py - Department flow → Grid enrichment: runs per department
bam_pipeline.py - Department flow → Grid satellite analysis: runs per department
bam_pipeline.py - Site pipeline → Database access: lists and saves sites
main.py - Site pipeline → Weather data: collects weather
main.py - Site pipeline → Soil data: collects soil
main.py - Site pipeline → CHIRPS rainfall: collects rainfall
main.py - Site pipeline → GPM rainfall: fallback rainfall
main.py - Site pipeline → NASA satellite indices: collects satellite indices
main.py - Site pipeline → Sentinel-2 indices: collects satellite indices
main.py - Site pipeline → Suitability scoring: scores observations
main.py - Grid enrichment → Weather data: collects weather
process/enrichir_grille.py - Grid enrichment → Soil data: collects soil
process/enrichir_grille.py - Grid enrichment → CHIRPS rainfall: collects rainfall
process/enrichir_grille.py - Grid enrichment → Elevation data: collects elevation
process/enrichir_grille.py - Grid enrichment → Suitability scoring: scores grid data
process/enrichir_grille.py - Grid enrichment → Database access: reads and updates grid
process/enrichir_grille.py - Grid satellite analysis → Sentinel-2 indices: requests indices
process/analyser_grille.py - Grid satellite analysis → NASA satellite indices: optional fallback
process/analyser_grille.py - Sentinel-2 indices → Google Earth Engine: queries imagery
collect/gee_sentinel.py - Grid satellite analysis → Database access: updates grid results
process/analyser_grille.py - Grid satellite analysis → Daily grid history: records history
process/analyser_grille.py - Commune enrichment → Benin boundaries: locates communes
- Grid generation → Benin boundaries: checks grid points
process/quadrillage.py - Database access → PostgreSQL: reads and writes
db/connexion.py - HTTP API → Database access: accesses data
- Grafana dashboard → PostgreSQL: visualizes data
README.md