Post

CW-RIS: Child Wind Risk Intelligence System

CW-RIS: Child Wind Risk Intelligence System

CW-RIS is a child-centered wind risk analysis app that overlays real-time ECMWF ERA5 wind forecast data with child population exposure (e.g., from WorldPop), school density, and hospital accessibility to compute and visualize risk zones. This Streamlit app enables faster, data-driven decisions for humanitarian response and preparedness.


πŸš€ What This App Does

  • βœ… Downloads live 10m wind forecast data (U & V components) from ECMWF ERA5 via CDS API
  • βœ… Computes wind speed magnitude from U and V components
  • βœ… Clips and reprojects child population raster to match wind data
  • βœ… Multiplies wind Γ— population to produce a child wind risk raster
  • βœ… Aggregates exposure using zonal statistics (by admin boundaries)
  • βœ… Enhances risk by factoring in school density and hospital proximity
  • βœ… Displays an interactive map with high-risk areas highlighted

πŸ› οΈ Features

  • πŸ“‘ Live ERA5 Wind Data via Copernicus CDS API
  • πŸ’¨ Wind Magnitude Calculation: sqrt(U^2 + V^2)
  • πŸ‘Ά Child Exposure Mapping using population rasters
  • 🏫 School Density Scoring using HDX education site data
  • πŸ₯ Hospital Accessibility Scoring using proximity buffers
  • πŸ—ΊοΈ Zonal Risk Statistics per admin region
  • πŸ–±οΈ Interactive Map with hover tooltips (Leafmap/Folium)
  • πŸ“ˆ Final Composite Risk Score for decision support

πŸ“ Project Structure

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
cw-ris/
β”œβ”€β”€ app.py                         # πŸ”΅ Main Streamlit entrypoint
β”œβ”€β”€ requirements.txt               # πŸ“¦ Python dependencies
β”œβ”€β”€ README.md                      # πŸ“˜ Project overview

β”œβ”€β”€ config/
β”‚   └── settings.py                # βš™οΈ File paths and constants

β”œβ”€β”€ data/
β”‚   β”œβ”€β”€ downloader.py              # 🌐 ERA5 wind downloader via CDS API
β”‚   └── validator.py               # βœ… File presence & CDS API checks

β”œβ”€β”€ logic/
β”‚   β”œβ”€β”€ wind_handler.py            # πŸ’¨ Wind speed calculation from U/V
β”‚   β”œβ”€β”€ exposure.py                # πŸ‘Ά Population Γ— wind risk computation
β”‚   β”œβ”€β”€ school_density.py          # 🏫 Compute school site counts per region
β”‚   └── hospital_access.py         # πŸ₯ Compute hospital proximity score

β”œβ”€β”€ ui/
β”‚   β”œβ”€β”€ map_display.py             # πŸ—ΊοΈ Map rendering with risk score
β”‚   └── sidebar.py                 # πŸ“š Sidebar with instructions

β”œβ”€β”€ utils/
β”‚   └── cleanup.py                 # 🧹 Temp file cleanup utility

β”œβ”€β”€ assets/                        # πŸ—‚οΈ Static geospatial inputs
β”‚   β”œβ”€β”€ aoi_bangladesh.geojson     # 🟑 AOI polygon
β”‚   β”œβ”€β”€ adm3.geojson               # 🟒 Admin boundaries for stats
β”‚   β”œβ”€β”€ bgd_pop_2025_CN_100m.tif   # πŸ‘Ά Child population raster
β”‚   β”œβ”€β”€ schools_hdx.geojson        # 🏫 Education facilities (HDX)
β”‚   └── hospitals_hdx.geojson      # πŸ₯ Health facility locations

πŸ“‚ Data Sources

DatasetSource URL
πŸ‘Ά Child Population RasterWorldPop 2025
πŸ₯ Health FacilitiesHDX - Bangladesh Healthsites
🏫 Education FacilitiesHDX - OSM Bangladesh Education
🟒 Admin Boundaries (ADM3)Provided by hackathon organizers
🟑 AOI for BangladeshProvided by hackathon organizers

πŸ“¦ Requirements

Install dependencies:

1
pip install -r requirements.txt

πŸ”‘ Setup: CDS API Key

  1. Register at https://cds.climate.copernicus.eu
  2. Go to your CDS API page
  3. Save your credentials in a .cdsapirc file in your home directory:
1
2
url: https://cds.climate.copernicus.eu/api
key: your_uid:your_api_key

▢️ Run the App

1
streamlit run app.py

Open in your browser at: http://localhost:8501


πŸ”„ How It Works

  1. Fetch latest wind forecast (5-day lag)
  2. Compute wind speed using U and V components
  3. Reproject child population to match wind raster
  4. Compute wind Γ— population exposure per pixel
  5. Aggregate by admin regions (zonal stats)
  6. Adjust risk by school density and hospital proximity
  7. Display interactive map with composite risk scores

πŸ“Š Example Outputs

  • Table ranking admin regions by Final Risk Score
  • Interactive map:
    • Color-coded composite risk zones
    • Highlighted highest-risk areas
    • Hover to view region risk breakdown

Notes

  • All spatial layers are assumed in EPSG:4326
  • Requires valid CDS API credentials and recent Python packages
  • Raster alignment done using rasterio.reproject()

Future Plans

  • Add flood and landslide hazard overlays
  • Connect to CCRI-DRM dashboards via GeoTIFF
  • Enable time-based risk forecasting
  • Extend for regional/global scalability

This post is licensed under CC BY 4.0 by the author.