Skip to content
OnlyProjects
B.Tech / B.E. · Artificial Intelligence & Machine LearningFor educational purposes only
Code included

District Rainfall Anomaly & SPI Drought Early-Warning System for Telangana (Python ML + Power BI)

Turns 124 years of IMD gridded rainfall into monthly forecasts, SPI drought flags and a Power BI drought calendar for Telangana districts

Mapped to your syllabusJNTUH R22 · Project Stage-II incl. Seminar · IV-2

Overview

1 min read

District Rainfall Anomaly & SPI Drought Early-Warning System is an advanced time-series project that converts the India Meteorological Department's 0.25° × 0.25° daily gridded rainfall dataset (1901–2024, published by IMD Pune) into operational drought intelligence for the 33 districts of Telangana — a state where a failed Northeast monsoon after a weak Southwest monsoon can push entire districts into agricultural distress within one season.

The pipeline parses the IMD binary/NetCDF grids with IMDLIB, aggregates daily rainfall to district-month series using a district shapefile overlay, computes each month's departure from the 30-year climatological normal, and derives the Standardized Precipitation Index (SPI) at 1-, 3- and 6-month scales by fitting the gamma distribution per district — the standard drought index used by the Indian Meteorological Department's own drought monitoring.

On top of that sit two models: a SARIMA forecaster (statsmodels) for next-month district rainfall with walk-forward validation, and a drought-onset classifier (scikit-learn HistGradientBoosting with class weighting) that predicts whether SPI-3 will fall below −1 next season — the moderate-drought threshold. Results live in MySQL and surface in a Power BI dashboard (CS308PC): district drought calendar, anomaly map, SPI trends and a monthly alert export that names the districts to watch.

The project fills CS705PC Project Stage-I (IV-1) with the literature survey, SPI implementation and baseline, and completes implementation, seminar and viva in Project Stage-II (IV-2, 11 credits).

Relevant for
Telangana
Level
Advanced · 14 weeks · team of 3
Common at
JNTU Hyderabad, Visvesvaraya Technological University, Anna University
Updated
Nov 2026

Syllabus alignment

JNTUH · R22

Project Stage-II incl. Seminar · IV-2 · 11 credits · CIE 40 + SEE 60

Subjects this project applies
  • CS604PC Machine Learning Lab
  • CS308PC Data Visualization (R / Power BI)
  • CS407PC Database Management Systems Lab (SQL)
  • CS606PC Skill Course — Spark (bulk gridded-data handling)
  • CS503PC DevOps (Git / Docker)
How it is evaluated

Stage-II: committee 20 + supervisor 20 internal, external examiner 60; pass 35% each, 40% overall

Also fits: VTU 2022 Scheme (OBE/CBCS), Anna University Regulation 2021.

What's in the box

11 parts · 5 free · 2 previewed · 4 unlock for ₹2,000

Problem & synopsis

5 min read

Problem statement

Telangana districts swing between flood-worthy rainfall and multi-month dry spells, but drought response is organised on declarations that trail the deficit by weeks or months. District officials receive rainfall figures, yet not the two derived answers that trigger timely action: how abnormal the current accumulation is against the long-term normal, and how likely the coming season is to cross the moderate-drought threshold. Research systems that answer these questions depend on satellite soil moisture, reanalysis products and licensed data that a college team cannot procure, reproduce or defend.

There is a need for a reproducible, statistics-grounded early-warning pipeline built on a single canonical public dataset — IMD's gridded daily rainfall — that (a) aggregates 124 years of grids to current district boundaries, (b) computes monthly anomalies and SPI-1/3/6 by the textbook gamma-fit method, (c) forecasts next-month rainfall and classifies next-season drought onset under strict walk-forward validation, and (d) presents district-wise alerts in a dashboard a collectorate briefing can use, with every model's measured error on display.

Synopsis

Abstract

Drought arrives slowly but is declared late: by the time wilting shows up in government reports, the window for seed substitution, fodder planning and relief works has narrowed. This project builds a district-level early-warning system for Telangana entirely on public data — IMD's 124-year gridded daily rainfall — by computing monthly anomalies from the 30-year normal and the Standardized Precipitation Index at three accumulations, forecasting next-month rainfall with SARIMA, and classifying next-season drought onset with a gradient-boosting model. Outputs are published through MySQL and a Power BI dashboard designed for a collectorate briefing.

Introduction

Telangana's agriculture is rain-dependent across most of its cropped area, and its Deccan-plateau position makes it sensitive to monsoon breaks — long rainless spells inside an otherwise normal season. The IMD gridded rainfall product gives one of the world's longest uniform rainfall records (1901–2024) at a resolution fine enough to separate neighbouring districts. What is missing is a reproducible pipeline that turns those grids into the two numbers decision-makers actually use: how much is this month off the normal? and what is the probability the next season turns drought?

Existing System

  • IMD's weekly and monthly rainfall reports give anomalies district-wise but no season-ahead drought probability.
  • State disaster portals compile indicators only after the season is under way.
  • Research drought models often mix satellite soil moisture and reanalysis data — powerful but hard for a B.Tech team to obtain, license and defend.
  • Gap: a transparent, reproducible pipeline on one canonical public dataset, comparing classical statistics (gamma-fit SPI) and machine learning under one walk-forward protocol.

Proposed System

  • Data engineering: IMDLIB downloads the 0.25° grids; a GeoPandas overlay with nearest-cell fallback aggregates daily rainfall to the 33 current districts; QA checks catch grid gaps and leap-day drift.
  • Climatology & SPI: monthly normals (1991–2020) and percentage anomalies; SPI-1/3/6 via a gamma fit per district and month, with the fitted parameters validated against a reference implementation.
  • Forecasting: SARIMA models per district for monthly rainfall, selected on AIC, validated walk-forward (train on years ≤ t, test t+1) with MAE and RMSE.
  • Classification: a HistGradientBoosting classifier predicts whether next-season SPI-3 drops below −1, using seasonal lags and accumulated rainfall features; class weighting handles the rarity of drought onset, and PR-AUC plus recall are the reported metrics.
  • Delivery: MySQL stores the series, indices and forecasts; Power BI renders the drought calendar, anomaly map and SPI trends; a script exports the monthly districts-to-watch alert list.

Feasibility Study

  • Technical: IMDLIB handles the binary/NetCDF formats natively; the Telangana slice fits in laptop RAM; Docker (CS503PC) packages the pipeline so the examiners' machine runs the demo identically.
  • Economic: zero — IMD's gridded data is free for research; the stack is open source; Power BI Desktop is free.
  • Operational: the dashboard reads precomputed MySQL tables, so the monthly refresh is a cron-able script; the caveat — precipitation-only SPI monitoring ignores evapotranspiration and soil moisture — appears wherever the alert list does.

Objectives

  1. 01Build a reproducible IMDLIB-based pipeline that converts IMD 0.25° gridded daily rainfall (1901–2024) into district-month series for the 33 Telangana districts using shapefile overlay with a nearest-cell fallback.
  2. 02Compute monthly rainfall anomalies against the 1991–2020 climatological normal and implement SPI-1/3/6 from scratch via gamma fitting, validated against a reference implementation.
  3. 03Fit SARIMA models per district for monthly rainfall and evaluate them with year-based walk-forward validation (MAE, RMSE).
  4. 04Train a HistGradientBoosting classifier to predict next-season SPI-3 < −1 (moderate drought onset) from seasonal lags, with class weighting for imbalance.
  5. 05Compare statistical and machine-learning approaches under one protocol and report PR-AUC and recall for the drought class.
  6. 06Persist series, indices, forecasts and model runs in MySQL with a documented schema.
  7. 07Deliver a Power BI dashboard (drought calendar, anomaly map, SPI trends) and an automated monthly district-alert CSV export.

Scope

In scope

  • IMD 0.25° gridded daily rainfall only (precipitation-driven drought monitoring).
  • The 33 current districts of Telangana; district-level outputs, not mandal or farm level.
  • SPI at 1-, 3- and 6-month scales; monthly anomaly percentages; 1991–2020 normals.
  • SARIMA forecasting one month ahead; drought-onset classification one season ahead.
  • MySQL storage, Power BI dashboard, monthly alert CSV, Docker packaging and a seminar deck.

Out of scope (v1)

  • Temperature, evapotranspiration and soil-moisture inputs (SPEI and agricultural-drought indices) — future scope.
  • Satellite NDVI or reanalysis datasets.
  • Operational deployment to a government server; the deliverable is a demonstrable pipeline and dashboard.
  • Mandal-level disaggregation and crop-specific drought sensitivity.
  • Automatic SMS/WhatsApp alerting — the alert layer stops at CSV and dashboard.

Methodology

The project follows the incremental (evolutionary) SDLC model with a statistical core: each increment ends in a runnable notebook, script or dashboard the guide can verify, which suits a two-stage university project where Stage-I already demands a working piece of analysis.

PhaseWeeksActivitiesDeliverable
Stage-I — survey & data1–3Literature survey (drought indices, SPI papers, IMD data documentation); IMDLIB download; district overlaySeries per district + survey chapter (CS705PC, CIE 100)
Stage-I — SPI core4–6Gamma-fit SPI-1/3/6 implementation, validation against reference values, anomaly climatologySPI module + validation report
Stage-I — baseline forecast7–8SARIMA per district, walk-forward harness, MAE/RMSE tablesBaseline forecast report
Stage-II — ML classifier9–10Drought-onset dataset (lags, accumulations), HistGradientBoosting with class weights, PR-AUC/recallModel comparison report
Stage-II — delivery11–12MySQL schema and loads, Power BI dashboard, alert CSV generator, Docker packagingWorking system demo
Stage-II — seminar & viva13–14Seminar presentation (part of Stage-II), consolidated report, viva rehearsal with committee-style Q&ASeminar + final report (CIE 40 + SEE 60)

Validation protocol: every index and model change re-runs the same harness — SPI code against reference SPI values, forecasts against walk-forward MAE/RMSE, the classifier against per-year precision-recall curves; no number enters the report without harness output.

Architecture & tech stack

3 diagrams · 9 technologies · 2 min read

  • Python
  • IMDLIB
  • pandas
  • NumPy
  • statsmodels
  • scikit-learn
  • Matplotlib
  • MySQL
  • Power BI

The system separates heavy offline computation from light online delivery. The offline pipeline (Python) downloads and aggregates IMD grids, computes indices and trains models, writing everything to MySQL; the online layer is Power BI reading MySQL directly, plus a cron-able alert exporter.

flowchart TD
  A["IMD Pune 0.25° gridded daily rainfall"] --> B["IMDLIB parser (.grd / NetCDF)"]
  B --> C["District aggregation (GeoPandas overlay)"]
  C --> D["MySQL: monthly rainfall series"]
  D --> E["Climatology & anomaly module"]
  D --> F["SPI module (gamma fit, 1/3/6-month)"]
  D --> G["SARIMA forecaster (statsmodels)"]
  F --> H["Drought-onset classifier (scikit-learn)"]
  E --> I["MySQL: indices, forecasts, model_runs"]
  F --> I
  G --> I
  H --> I
  I --> J["Power BI dashboard"]
  I --> K["Monthly alert CSV exporter"]

ER diagram

erDiagram
  DISTRICT ||--o{ MONTHLY_RAINFALL : "records"
  MONTHLY_RAINFALL ||--o{ SPI_VALUE : "derives"
  DISTRICT ||--o{ FORECAST : "receives"
  MODEL_RUN ||--o{ FORECAST : "produces"
  FORECAST ||--o{ ALERT : "triggers"
  DISTRICT {
    int district_id PK
    string district_name
    float centroid_lat
    float centroid_lon
  }
  MONTHLY_RAINFALL {
    int rain_id PK
    int district_id FK
    int year
    int month
    float total_mm
    float normal_mm
    float anomaly_pct
  }
  SPI_VALUE {
    int spi_id PK
    int rain_id FK
    int scale_months
    float spi
    string drought_class
  }
  MODEL_RUN {
    int run_id PK
    string model_name
    string params_json
    float mae
    float pr_auc
  }
  FORECAST {
    int forecast_id PK
    int district_id FK
    int run_id FK
    int target_year
    int target_month
    float predicted_mm
    float drought_probability
  }
  ALERT {
    int alert_id PK
    int forecast_id FK
    string severity
    date issued_on
  }

DFD level 0

flowchart LR
  IMD(["IMD Pune data server"]) -- "0.25° daily rainfall grids" --> SYS(("Drought Early-Warning<br/>System"))
  O(["District officer / collectorate staff"]) -- "month & district query" --> SYS
  SYS -- "anomaly, SPI, drought probability, alert CSV" --> O
  S(["Guide & seminar committee"]) -- "review requests" --> SYS
  SYS -- "validation tables, dashboard" --> S

A monthly refresh walk-through: the job downloads the latest grid month, recomputes district aggregates, updates SPI rows, re-scores forecasts, and the alert exporter writes the districts-to-watch CSV that Power BI's alert page renders with severity colours.

Modules

4 modules

  1. Module 01

    Gridded Data Engineering (Member 1)

    Downloads the IMD 0.25° daily rainfall grids with IMDLIB for 1901–2024, parses the binary/NetCDF arrays, and aggregates them to the 33 current Telangana districts using a GeoPandas overlay of the district shapefile with an area-weighted nearest-cell fallback for coastal-effect grid mixtures. Includes QA: grid-gap detection, leap-day handling, monsoon-total sanity checks against IMD's published subdivision figures, and a Dockerfile so the whole stage runs identically anywhere.

  2. Module 02

    Climatology, SPI & SARIMA Forecasting (Member 2)

    Implements the statistical core: 1991–2020 monthly normals and percentage anomalies per district; SPI at 1-, 3- and 6-month scales by fitting the gamma distribution per district-month and mapping to the standard drought classes (moderate ≤ −1, severe ≤ −1.5, extreme ≤ −2), cross-validated against a reference SPI implementation; and per-district SARIMA models for monthly rainfall selected on AIC and evaluated in a year-based walk-forward harness with MAE and RMSE tables.

  3. Module 03

    Drought-Onset Classification, MySQL & Power BI Delivery (Member 3)

    Builds the drought-onset dataset from seasonal lags and accumulated rainfall, trains a HistGradientBoosting classifier for next-season SPI-3 < −1 with class weighting for the rare positive class, and reports PR-AUC and recall per held-out year. Designs the MySQL schema (districts, rainfall, SPI, forecasts, model runs, alerts), generates the monthly alert CSV, and builds the Power BI dashboard — drought calendar, filled-map anomaly view and SPI trend lines — as the seminar's centrepiece.

  4. Module 04

    Shared — Testing, Documentation & Seminar

    pytest suites for the aggregation and SPI code (including exact-value tests against reference SPI), integration tests for the MySQL loads, the consolidated runbook (make download && make series && make spi && make train && make alerts), the Stage-I literature chapter and the Stage-II seminar deck with the validation tables. All three members rehearse the committee-style viva with per-owner questions.

Slides

13 slides · titles free · bullets, notes and the .pptx unlock

  1. Slide 1

    District Rainfall Anomaly & SPI Drought Early-Warning System

  2. Slide 2

    Why Drought Early Warning

  3. Slide 3

    Problem Statement

  4. Slide 4

    Data — IMD Gridded Rainfall

  5. Slide 5

    Methodology — Stage-I vs Stage-II

  6. Slide 6

    Climatology & SPI

  7. Slide 7

    System Architecture

  8. Slide 8

    Forecasting & Classification

  9. Slide 9

    Validation

  10. Slide 10

    Demo — Power BI Dashboard

  11. Slide 11

    Limitations

  12. Slide 12

    Individual Contributions

  13. Slide 13

    Conclusion & Future Scope

Bullets, speaker notes and the .pptx · ₹2,000

The titles above are the real outline. The rest is what you present from.

Unlock for ₹2,000

Viva questions & answers

3 of 16 answered free · 13 unlock

Read each answer, close it, and say it in your own words. Your viva will ask. Now you'll know.

  1. 01Concept

    What exactly is the Standardized Precipitation Index and why do we need it?

    SPI standardises rainfall accumulation over a chosen time scale — here 1, 3 and 6 months — against the historical distribution for the same district and month, so a value of −1 always means 'drier than about 84 percent of history' regardless of whether the district averages 600 mm or 1,100 mm. Raw rainfall cannot be compared across districts and months; SPI puts them on one comparable scale, which is why IMD and global drought monitoring use it.

  2. 02Concept

    Why fit a gamma distribution to monthly rainfall instead of assuming normality?

    Monthly rainfall is bounded below by zero and strongly right-skewed — many dry months cluster near zero with occasional very wet months — so a normal fit would produce impossible negative rainfalls and distorted probabilities. The gamma family handles positive, skewed data; we fit it per district-month, apply the cumulative probability, and invert the standard normal to obtain the SPI. A log-normal variant is a known alternative; we justify gamma because it is the McKee et al. standard our literature follows.

  3. 03Concept

    Why do you classify drought onset instead of just forecasting rainfall?

    Because the decision that matters is categorical: does the coming season cross the moderate-drought threshold (SPI-3 below −1) or not. A rainfall number still needs interpretation against the normal, and its errors are hard to read operationally. The classifier outputs a probability of crossing the threshold, which maps directly onto the alert bands the dashboard displays — moderate watch versus severe alert.

+13 more questions, with answers

Try the free ones out loud first. Your examiner will not accept “it's in the PPT”.

Source code & how to run

8 steps · complete source code · unlocks with the project

Unlocks with the project · ₹2,000

8 steps · source code zip

Prerequisites, install, seed data and tests, written for demo day. Plus the complete source.

Unlock for ₹2,000

READMEFIRST

281 words · unlocks with the project

What to change before it goes anywhere near a submission. Skipping it is how the demo fails live.

Unlocks with the project · ₹2,000

281 words · ~1 min read

The checklist of things to rename, re-seed and re-think so the project reads as yours.

Unlock for ₹2,000

Instructions

371 words · unlocks with the project

How to study it, adapt it and walk your examiner through it, step by step.

Unlocks with the project · ₹2,000

371 words · ~2 min read

Report structure, formatting rules and the submission checklist your department will grade.

Unlock for ₹2,000

References

8 sources

  1. IMD Pune — Daily Gridded Rainfall Data (0.25° × 0.25°), 1901–2024
  2. IMDLIB — Python library for reading and downloading IMD gridded data
  3. IMD — Rainfall Information (state-wise districts)
  4. statsmodels — Time Series Analysis (SARIMA) documentation
  5. scikit-learn User Guide — ensemble methods and model evaluation
  6. Microsoft Power BI documentation
  7. Rob J. Hyndman & George Athanasopoulos, Forecasting: Principles and Practice, 3rd ed.
  8. T. B. McKee, N. J. Doesken, J. Kleist, The Relationship of Drought Frequency and Duration to Time Scales, 8th Conference on Applied Climatology, AMS, 1993

Cite this bundle

OnlyProjects. (2026). District Rainfall Anomaly & SPI Drought Early-Warning System for Telangana (Python ML + Power BI): B.Tech / B.E. Artificial Intelligence & Machine Learning project bundle [Educational resource]. https://onlyprojects.online/projects/btech-aiml-telangana-rainfall-anomaly-spi-drought-early-warning

Future scope

1 min read

  • Add temperature and evapotranspiration to compute SPEI, covering agricultural rather than only meteorological drought.
  • Ingest NDVI from open satellite sources to cross-check drought flags with vegetation stress.
  • Extend to the Krishna and Godavari basins across state borders with the same pipeline (change one shapefile).
  • Replace the single best model with an ensemble of SARIMA, gradient boosting and a persistence baseline, weighted by recent walk-forward performance.
  • Link alert lists to crop calendars so severity bands become action advisories per sowing window.
  • A scheduled cloud job that refreshes the pipeline monthly and pushes the alert CSV to a public dashboard.

Keep browsing

Same degree, same syllabus slot, different idea. Pick the one your guide will actually approve.

B.Tech / B.E.Code included

Aerospace / Aeronautical

Low-Speed Open-Circuit Wind Tunnel with Force Balance for Aerofoil Lift-Drag Measurement

Build a subsonic test tunnel on a student budget, then trace lift and drag on a 3D-printed NACA 0012 against theory

  • C / Arduino Uno (industry-standard extra) — HX711 load-cell and serial logging firmware
  • Python (NumPy, Matplotlib) — calibration, force coefficients and plots
  • MATLAB / Scilab — thin-airfoil theory overlay and regression
  • +4

intermediate14 wk4 students