FloodWatch360
Description
FloodWatch360 — AI-powered flood early warning system for Pakistan using an LSTM trained on ERA5 satellite reanalysis data, delivering real-time 7-day flood risk predictions across 67 cities via an interactive web dashboard with automated email alerts.
Objectives
FloodWatch360 aims to address the critical gap in accessible, real-time flood early warning infrastructure for Pakistan — a country that ranks among the world's most flood-vulnerable nations, suffering billions in losses and thousands of casualties annually. 1. Develop a Reliable Flood Prediction Model Design and train a deep learning model capable of predicting flood risk up to 7 days in advance at the city level. Using an LSTM (Long Short-Term Memory) architecture trained on ERA5 satellite reanalysis weather data from Google Earth Engine, combined with verified historical flood event records from the EM-DAT international disaster database, the model learns complex temporal patterns in precipitation, soil moisture, temperature, and hydrological indicators that precede flood events. The model achieves 97.6% ROC-AUC and 84.4% recall on held-out test data. 2. Build an Accessible Real-Time Dashboard Deliver predictions through an interactive web application that requires no technical expertise to use. The dashboard presents a live Leaflet.js map of Pakistan with color-coded risk markers for 67 major cities, a heatmap overlay for regional risk visualization, and per-city detail panels showing current risk scores, contributing weather factors, and 7-day forecasts. The system is updated daily using live weather data fetched from the Open-Meteo API, ensuring zero data delay without dependency on expensive commercial data services. 3. Enable Proactive Community and Authority Alerting Implement an automated email alert system so that residents, local government officials, and disaster management authorities can subscribe to notifications for specific cities. When the model flags a city as high-risk, alerts are dispatched automatically — giving communities the lead time needed to evacuate, pre-position resources, and activate emergency protocols. The system is secured with user authentication and supports an admin panel for managing subscribers and monitoring system status.
Socio-economic benefit
Pakistan loses an average of $3–4 billion annually to flood damage, with the 2022 mega-floods alone causing $30 billion in economic losses and displacing 33 million people. FloodWatch360 directly addresses the human and economic cost of inadequate early warning infrastructure across several dimensions. 1. Life Safety and Reduced Casualty Rates The most immediate benefit is the preservation of human life. With 7-day advance flood predictions at the city level, residents in high-risk areas have sufficient time to evacuate before floodwaters arrive. Early warning systems are widely documented by the UN as the single most cost-effective disaster risk reduction intervention — studies estimate that 24 hours of warning can reduce flood-related deaths by up to 30%. For communities along Pakistan's Indus, Kabul, Jhelum, and Chenab river corridors, this translates directly into lives saved each monsoon season. 2. Protection of Livelihoods and Agricultural Assets The majority of Pakistan's rural population depends on agriculture for income. Flash floods destroy standing crops, livestock, farm equipment, and stored grain — losses from which smallholder farmers rarely recover fully. Advance warning allows farmers to move livestock, harvest early where possible, and relocate critical equipment, significantly reducing household-level economic devastation and preventing the long-term poverty trap that follows repeated flood losses. 3. Reduced Government and Aid Expenditure Emergency response, temporary shelter, food distribution, and infrastructure reconstruction following flood events place enormous strain on government budgets and international aid systems. By enabling proactive resource pre-positioning — moving relief supplies, deploying rescue teams, and opening evacuation centres before flooding peaks — FloodWatch360 reduces the cost and chaos of reactive disaster response. The system is built entirely on open data and open-source software, meaning it can be maintained and scaled by government agencies at near-zero marginal cost. 4. Strengthened Institutional Decision-Making District disaster management authorities currently rely on manual river gauge readings and informal reports, with little lead time for coordinated response. FloodWatch360 gives local officials a data-driven, city-specific risk dashboard they can act on confidently — improving coordination between civil administration, military, and humanitarian organisations during flood events. 5. Long-Term Climate Resilience As climate change intensifies Pakistan's monsoon variability and increases the frequency of extreme precipitation events, the need for adaptive infrastructure grows. FloodWatch360 establishes a replicable, scalable framework that can be extended to additional cities, integrated with national disaster management systems, and retrained as climate patterns evolve — building lasting institutional resilience rather than a one-time solution.
Methodologies
FloodWatch360 follows an end-to-end machine learning pipeline, from raw satellite data acquisition through model training to real-time web deployment. 1. Data Collection Historical weather data was extracted from Google Earth Engine (GEE) using the ERA5-Land reanalysis dataset — a globally consistent, satellite-derived record of daily surface conditions including precipitation, temperature, soil moisture, evapotranspiration, and surface runoff. Data was collected for 30 major Pakistani cities spanning multiple years. Flood event ground truth labels were sourced from the EM-DAT International Disaster Database, which records verified flood events with start/end dates and affected regions, providing province-level flood occurrence records that were mapped to city-level daily labels. 2. Feature Engineering Raw daily weather variables were enriched with temporal features: 7-day rolling averages and sums of precipitation and runoff to capture antecedent soil saturation, discharge trend indicators, and cyclical month encodings (sine/cosine transforms) to represent seasonal patterns. A binary flood label was constructed using a 7-day lookahead window — a day is labelled as a flood risk day if a confirmed flood event occurs within the following 7 days, aligning the prediction target with actionable warning lead time. 3. Model Architecture The core model is a stacked LSTM (Long Short-Term Memory) network — a recurrent neural network architecture specifically designed for temporal sequence modelling. Input sequences of 14 consecutive days of weather features are passed through LSTM layers with LayerNorm and dropout regularisation, followed by a fully connected output layer producing a 2-class flood/no-flood probability. The architecture captures both short-term weather shocks and longer-term hydrological buildup that precedes major flood events. 4. Training The dataset was split chronologically — training on earlier years, validation on a middle period, and testing on the most recent year — to simulate real-world deployment conditions and prevent data leakage. Class imbalance (floods represent roughly 6–8% of days) was handled using a weighted random sampler. The model was optimised using AdamW with cosine annealing learning rate scheduling and early stopping based on validation F1-score. 5. Deployment The trained model is served via a Flask REST API backend. On a daily schedule, the backend fetches current weather data from the Open-Meteo Archive API, constructs input sequences for each city, runs inference, and writes predictions to a CSV store. The React frontend queries the API on load and renders city risk levels on an interactive Leaflet.js map. User authentication, subscription management, and email alerting are handled server-side, with PostgreSQL for persistent storage and SendGrid for transactional email delivery.
Outcome
FloodWatch360 successfully delivers a fully functional, end-to-end flood early warning system for Pakistan, meeting all core objectives set at the outset of the project. 1. Trained Predictive Model A deep learning LSTM model was successfully trained on ERA5 satellite reanalysis data for 30 Pakistani cities. The model demonstrates strong predictive performance on held-out test data, achieving a ROC-AUC of 97.6%, F1-score of 78.3%, recall of 84.4%, and precision of 73%. The high recall is particularly significant in a disaster warning context — the model correctly identifies 84 out of every 100 real flood events, minimising the missed warnings that carry the greatest human cost. The model generalises across diverse geographic and hydrological conditions, covering river cities, arid plains, mountainous regions, and urban centres simultaneously. 2. Live Web Dashboard A production-grade web application was built and deployed, accessible via browser on both desktop and mobile devices. The dashboard renders a real-time interactive map of Pakistan with risk markers for all 67 monitored cities, colour-coded across four risk levels. Features include a heatmap overlay for regional risk visualisation, per-city detail panels with current risk scores and contributing weather factors, a historical flood event timeline for contextual validation, and a search interface for rapid city lookup. The system updates daily with no manual intervention required. 3. Automated Alert Infrastructure A fully operational email alert system was implemented, allowing residents and officials to subscribe to city-specific flood warnings. Alerts are triggered automatically when model predictions cross the high-risk threshold, providing advance warning ahead of potential flood events. The system supports role-based access with a secure admin panel for subscriber management and system monitoring. 4. Validated Against Historical Events The model's predictions were cross-referenced against confirmed EM-DAT flood events including the 2022 Pakistan mega-floods, 2023 monsoon floods, and 2024 Punjab/Sindh events. The system correctly elevated risk scores in affected cities in the days preceding these events, confirming its real-world utility beyond held-out test metrics. 5. Scalable Open-Source Foundation The entire system is built on open-source software and open data sources, with no dependency on paid APIs for core prediction functionality. This makes the system practically replicable by government agencies or NGOs at minimal cost. The modular pipeline — data extraction, feature engineering, model training, API serving, and frontend — can be independently updated, retrained with new data, or extended to additional cities and countries without architectural changes.
Gallery
More from Computer Science
Ustad Go: An AI-Powered Mobile and Web Ecosystem for Verified Local Service Provision in P…
Ustad Go is a dual-platform solution bridging the gap between skilled local service providers and households.…
Supervisor: Dr. Wasif Nisar
Sales Distribution Hub
The Sales Distribution Hub is a web-based management system designed for Masood & Company to automate and stre…
Supervisor: Dr. Wasif Nisar.
AI Based Road Damage Detection System
AI Based Road Damage Detection System is a smart application that uses YOLOv8 and computer vision techniques t…
Supervisor: Mehwish Mukhtar
EvaluTech: AI-Powered Hiring & Job Platform for Employers and Applicants
EvaluTech is an intelligent recruitment management platform that streamlines the complete hiring lifecycle fro…
Supervisor: Dr. Wasif Nisar