Advanced hydrological forecasting, rainfall analysis, blood bank locator, emergency guidelines, and incident-reporting simulation for public safety and preparedness.
Note
Sahay was originally developed in 2025 as part of the academic curriculum for the EPICS course at VIT Bhopal University. It has now been completely overhauled into a modern, dynamic web application, upgrading its model speed, repository structure, and visual aesthetics to state-of-the-art glassmorphic standards.
Click to Expand/Collapse Table of Contents
- π Overview
- β¨ Core Features
- πΈ Screenshots
- π οΈ Technology Stack
- π Project Architecture
- βοΈ How the System Works
- π Getting Started
β οΈ Limitations & Assumptions- π Data Sources
- π License
- π Academic Origins & Credits
Sahay is a comprehensive Flask-based disaster resilience platform that fuses machine-learning hydrological intelligence with practical, on-the-ground emergency support utilities. Designed with a stunning dark glassmorphic UI, it provides a unified hub to:
- Forecast river flood risks
- Analyze monthly subdivision rainfall patterns
- Locate life-saving blood banks
- Access direct-dial emergency helplines
- Study interactive disaster Standard Operating Procedures (SOPs)
- Simulate mock incident-reporting for training and demonstrations
(The active v1.0 application is housed inside app/, while the preserved v0 legacy prototype is kept under v0Archive/ to document the project's evolution.)
- Flood Prediction (ARIMA + LDA): Forecasts water-level metrics for major rivers (Cauvery, Godavari, Krishna, Mahanadi, Son) and classifies real-time flood risk using Machine Learning.
- Rainfall Analysis (1D-CNN + RF): Predicts April-December monthly rainfall for Indian meteorological subdivisions using either a cached Deep Learning CNN or a Random Forest Regressor.
- Blood Assistance Portal: A lightning-fast, AJAX-powered locator to find local blood bank records by state and city, complete with copy actions, direct dialers, and donor eligibility guidelines.
- Emergency Contacts: A quick-dial public safety directory for Police, Ambulance, Fire, NDRF, NDMA, and Women Helplines.
- Interactive Disaster SOPs: Actionable, tabbed do's and don'ts checklists for Floods, Earthquakes, Cyclones, Landslides, Tsunamis, Wildfires, and Thunderstorms.
- Incident Reporting Simulator: A visually engaging prototype workflow simulating emergency dispatch routing and coordinate generation.
Click to view all detailed screenshots (Module-wise)
| Layer | Technologies Used |
|---|---|
| Frontend UI | HTML5, Jinja2, Vanilla CSS3 (Glassmorphism), Vanilla JavaScript |
| Backend Framework | Python 3.10+, Flask, Werkzeug |
| Data Processing | Pandas, NumPy, openpyxl |
| Flood Models | statsmodels (ARIMA), scikit-learn (LDA), imblearn (SMOTE) |
| Rainfall Models | TensorFlow/Keras (1D-CNN), scikit-learn (Random Forest) |
| Visualizations | Matplotlib (Agg backend) for dynamic dark-mode server charting |
π¦ DSN3099
β£ π screenshots/ # High-resolution UI mockups and dashboards
β£ π v0Archive/ # Legacy v0 source code and conceptual media
β£ π app/ # Modern Optimized Application (v2.0)
β β£ π core/ # Isolated Machine Learning & pipeline logic
β β β£ π hydrology.py # Flood ARIMA forecasting & LDA classification
β β β π rainfall.py # CNN / RF rainfall prediction pipelines
β β£ π data/ # Datasets: River workbooks, IMD rainfall, Blood banks
β β£ π static/ # Frontend assets, stylesheets, and visual graphics
β β β£ π css/ # CSS design system (sahay.css)
β β β£ π images/ # Brand graphics and standalone SVGs
β β β π charts/ # Dynamic chart target outputs (flood.png, rainfall.png)
β β£ π templates/ # Modular camelCase Jinja2 HTML views (base.html, index.html, etc.)
β β£ π trained/ # Serialized model artifacts (.h5, .pkl)
β β£ π __init__.py # Flask app factory & blueprint registration
β β π routes.py # Core routing, form handling, AJAX endpoints
β£ π .env.example # Environment configuration template
β£ π requirements.txt # Python package dependencies
β£ π run.py # Local WSGI development server entry point
β π README.md # Project documentation & specifications
User inputs River & Date β hydrology.py reads historical river workbook β Generates ARIMA future trend β Extracts structural features β Passes vector to LinearDiscriminantAnalysis β Classifies Normal vs. High Risk β Renders Matplotlib chart & metrics table.
User inputs Subdivision, Year & Model β rainfall.py parses IMD dataset β If CNN, loads cached Keras .h5 model (or trains on-the-fly) β If RF, trains RandomForestRegressor β Predicts AprilβDecember mm β Calculates MAE & Variance β Renders comparative chart.
routes.py loads blood_banks_india.csv globally on server start β Normalizes strings (Title Case) β Exposes /getCities and /searchBloodBanks JSON endpoints β Client-side JS fetches and renders results instantly without page reloads.
git clone https://github.com/Varaxion/DSN3099.git
cd DSN3099Windows:
python -m venv epicsenv
.\epicsenv\Scripts\Activate.ps1macOS/Linux:
python3 -m venv epicsenv
source epicsenv/bin/activatepip install -r requirements.txtpython run.pyThe Sahay portal will be live at http://127.0.0.1:5000
- ARIMA Horizons: Flood forecasting relies on historical moving averages; long-term horizon accuracy decays naturally.
- LDA Covariance: Flood risk classification assumes equal covariance matrices across normal and high-risk classes.
- Rainfall Granularity: Both CNN and RF models operate on aggregated monthly subdivision data, not hyperlocal or daily weather metrics.
- Incident Reporting: The reporting module is strictly a UI prototype/simulation. It does not dispatch or alert real-world NDRF agencies.
- Medical Data: Blood bank contact numbers and addresses are sourced from open datasets and should be independently verified in a real emergency.
This academic project relies on several historical and open-source datasets to power its machine learning models and locator utilities:
- Hydrological River Data (
Cauvery.xlsx,Godavari.xlsx, etc.): Historical water level and runoff metrics sourced from the Central Water Commission (CWC) and India-WRIS (Water Resources Information System). - Subdivision Rainfall Data (
imd-rainfall-2021.csv): Historical subdivision-wise monthly rainfall metrics provided by the Indian Meteorological Department (IMD) (frequently hosted on Open Government Data platforms). - Blood Bank Directory (
blood-banks-india.csv): Nationwide blood bank addresses and contact details aggregated from the Ministry of Health and Family Welfare (e-RaktKosh) and the Open Government Data Platform India (data.gov.in).
This repository is licensed under the MIT License. You are free to use, modify, and distribute this code for your own academic or personal projects.
Warning
Exclusions & Third-Party Licenses:
The MIT License applies only to the original source code. The following assets are strictly excluded:
- Datasets: Data files in
app/data/(CWC, IMD, e-RaktKosh) are government property and are included for demonstration purposes only. - Academic Documents: Reports and videos in
v0Archive/docs/are fully copyrighted by the authors and VIT Bhopal University. - Hyperspace Template: The legacy template in
v0Archive/hyperspaceTemplate/is governed by a separate Creative Commons Attribution 3.0 Unported (CCA 3.0) license.
This repository originated as an academic project for VIT Bhopal University by Team-EPICS348 as part of the EPICS course in 2025. The original conceptual prototype was a collaborative effort by the following team members:
| Name | Registration No. |
|---|---|
| Chelsi Patel | 22BAI10005 |
| Aditya Nayak | 22BAI10424 |
| Rushabh Wagh | 22BCE10364 |
| Kavya | 22BCE10385 |
| Tejas Pathak | 22BCE10853 |
| Simarpreet Singh | 22BCE10914 |
| Sneha Mishra | 22BCE10932 |
| Pooja | 22BCE10984 |
| Ruturaj Bhoite | 22BHI10027 |
| Archana Prasad Nair | 22BSA10238 |
Important
v1.0 Overhaul: While the initial data gathering, research support, and legacy model iterations were developed collaboratively by Team-EPICS348, the complete system architectural overhaul, 1D-CNN model cache integration, dynamic dark-mode Matplotlib engine, responsive glassmorphic loaders, Flask app restructuring, repository documentation, and premium v1.0 CSS design system were engineered by Kavya.
β Re-engineered by Kavya β






























