Inspiration

Tamil Nadu has repeatedly witnessed the catastrophic impact of unprecedented cyclonic deluges and seasonal monsoon floods. From the devastating floods of Cyclone Michaung in December 2023 that brought Chennai to a standstill, to the unprecedented torrential downpour in Southern Tamil Nadu (Thoothukudi and Tirunelveli) where over $900\text{ mm}$ of rain fell in under 48 hours, the recurring pattern was clear: reactive disaster response is simply not enough.

Communities suffered not just from rainfall volume, but from compounded vulnerabilities—urban concrete runoff bottlenecks, choked estuaries during high sea surges, and delayed warnings to frontline citizens. We were inspired to bridge the critical gap between raw meteorological telemetry and actionable, transparent early warning. We envisioned AQUAPREDICT: an intelligent, explainable disaster intelligence platform designed to predict flood hazards up to 7 days in advance across all 38 districts of Tamil Nadu and broadcast immediate, life-saving alerts before water levels rise.

What it does

AQUAPREDICT is a real-time, AI-powered flood risk forecasting and emergency alert ecosystem that transforms complex climate data into proactive disaster preparedness:

Real-Time 38-District Surveillance: Ingests live satellite meteorology, coastal ocean surges, and river discharge streamflow for every district in Tamil Nadu.

Calibrated Risk Classification: Evaluates multi-temporal rainfall and terrain factors to categorize district flood risk into 4 actionable levels: Low, Moderate, High, and Severe.

Explainable AI (XAI) with SHAP: Eliminates black-box ML predictions by computing Shapley values, showing disaster officials the exact contributing factors (e.g., $42%$ driven by soil saturation, $28%$ by poor drainage, $18%$ by coastal sea surge).

Multi-Channel Emergency Broadcasting: Automatically dispatches instant emergency alerts via SMS & WhatsApp (via Twilio) and Email (SMTP) directly to disaster response teams and residents when high thresholds are breached.

Hydro-Reservoir & Dam Analytics: Tracks live reservoir fill percentages, inflow rates, and safety buffers across major state dams (Mettur, Bhavanisagar, Vaigai, Chembarambakkam). Interactive Command Center: Features dynamic geospatial risk heatmaps, historical precipitation trend charts, and an interactive Scenario Simulation Sandbox enabling officials to model "what-if" rainfall surges.

How we built it

AQUAPREDICT is built on a decoupled, high-throughput architecture consisting of an asynchronous FastAPI backend and a reactive Vite + React frontend with a native Capacitor bridge for cross-platform mobile access.

  1. Data Ingestion & Feature Engineering

We engineered a 9-feature hydrological model incorporating both atmospheric forcing ($60%$ weight) and terrain/infrastructure vulnerability ($40%$ weight):

Meteorological Telemetry: Extracted from Open-Meteo, NASA POWER, and Open-Meteo Marine/Flood APIs: 1-day acute rainfall volume: $P_{1\text{D}}$ 3-day cumulative rainfall: $$P_{3\text{D}}(t) = \sum_{k=0}^{2} P(t - k)$$ 7-day cumulative rainfall: $$P_{7\text{D}}(t) = \sum_{k=0}^{6} P(t - k)$$ 7-day daily rainfall average: $$\bar{P}{7\text{D}} = \frac{1}{7} \sum{k=0}^{6} P(t - k)$$ Terrain & Infrastructure Factors: District drainage quality index ($D$), urbanization impermeability coefficient ($U$), coastal surge vulnerability ($C$), deforestation rate ($F$), and upstream dam retention buffer ($B$). The composite risk score $R_{\text{hazard}} \in [0, 100]$ is mathematically modeled as: $$R_{\text{hazard}} = \sum_{j=1}^{9} w_j \cdot \tilde{f}j$$ $$\text{where } \sum{j \in \text{meteo}} w_j = 0.60, \quad \sum_{j \in \text{vuln}} w_j = 0.40, \quad \sum_{j=1}^{9} w_j = 1.00$$

  1. Machine Learning & Probability Calibration To classify hazard severity:

Feature Normalization: $$z = \frac{x - \mu}{\sigma}$$ SMOTE Balancing: To combat the scarcity of historical catastrophic flood events, we applied Synthetic Minority Over-sampling Technique: $$x_{\text{new}} = x_i + \lambda (x_{zi} - x_i), \quad \lambda \sim \mathcal{U}(0, 1)$$ Random Forest Classifier: Built with an ensemble of decorrelated decision trees, aggregating votes across estimators: $$\hat{y} = \arg\max_{c} \frac{1}{B} \sum_{b=1}^{B} I(h_b(\mathbf{x}) = c)$$ Platt Sigmoid Probability Calibration: $$P(Y = c \mid f(\mathbf{x})) = \frac{1}{1 + \exp(A \cdot f(\mathbf{x}) + B)}$$

  1. Explainability (SHAP Values) To foster trust with emergency response officials, we integrated TreeSHAP based on cooperative game theory, attributing each feature's marginal contribution: $$\phi_i(v) = \sum_{S \subseteq N \setminus {i}} \frac{|S|!(|N| - |S| - 1)!}{|N|!} \left[ v(S \cup {i}) - v(S) \right]$$

  2. Frontend & Notification Delivery

Frontend: React 18, Tailwind CSS, Lucide icons, Leaflet geospatial mapping, and Recharts. Notification Engine: Background tasks powered by APScheduler and FastAPI background workers to trigger asynchronous Twilio REST API calls and secure SMTP relays without blocking user UI interactions.

Challenges we ran into Severe Class Imbalance: Disasters and 100-year flood levels are rare outliers compared to non-flood days. Standard models were biased toward predicting "Low Risk". We resolved this by building a leak-free pipeline where StandardScaler is fitted strictly within folds, followed by domain-calibrated SMOTE on training splits.

API Ingestion Latency & High Rate Limits: Fetching weather, marine, and flood telemetry for 38 distinct geographical coordinates simultaneously caused bottlenecking. We mitigated this by implementing an asynchronous batch fetcher with exponential backoff and localized cache layers.

Real-Time SHAP Computation Overhead: Generating Shapley additive explanations on the fly during API requests can introduce noticeable latency. We pre-computed tree structures and utilized TreeSHAP's optimized path-dependent tree explainer algorithms to achieve sub-100ms inference explanations.

Cross-Platform Responsive Mobile Usability: Field rescue personnel often operate on smartphones under poor connectivity. We resolved responsive UI layout issues by converting the desktop dashboard into mobile card layouts and integrating Capacitor native plugins for hardware back-button and status-bar control.

Accomplishments that we're proud of

Sub-2-Second End-to-End Alerting: Successfully achieved automated pipeline execution from weather ingestion $\rightarrow$ ML classification $\rightarrow$ multi-channel SMS, WhatsApp, and email dispatch in under 2 seconds.

Actionable Explainability: Built a visual XAI breakdown panel that translates complex Shapley math into intuitive percentage bars that civil officers can understand at a glance.

Full 38-District Coverage: Comprehensive geospatial mapping encompassing all coastal, delta, hilly, and plain districts across Tamil Nadu.

Robust Cross-Validation: Validated across a 5-fold Stratified Cross-Validation schema yielding high macro-F1 and calibrated probability metrics.

What we learned

Hydrological Dynamics: Rainfall intensity alone does not equal a flood. Deep soil saturation from a 7-day accumulation window paired with impervious urban concrete creates dramatically higher peak runoff coefficients than isolated 1-day downpours.

Engineering Clean Pipelines: Developing production-grade ML systems requires rigorous separation between data preprocessing, calibration, and inference to prevent lookahead data leakage.

Human-Centered Emergency Design: In crisis management systems, visual clarity, speed, and explainability matter just as much as raw algorithmic accuracy.

What's next for AQUAPREDICT

IoT River-Gauge & Dam Sensor Integration: Direct telemetry streaming from Central Water Commission (CWC) IoT stream-gauges and dam automated discharge gates.

High-Resolution 2D Inundation Modeling: Combining Digital Elevation Models (DEM) with 2D hydrodynamic flood routing algorithms to predict street-level water depths.

Offline-First Mesh Network & Cell Broadcast: Implementing mesh radio and PWA offline caching to ensure alerts reach cut-off zones during telecommunication grid failures.

Tamil Voice IVR Alerts: Automated voice calls in Tamil for rural citizens, senior citizens, and communities without access to smartphones or internet data.

Built With

Share this project:

Updates

Submission history