Skip to content

agrimgarg08/drishti

Repository files navigation

Banner

DRISHTI

Real-time river pollution monitoring, anomaly detection, and response support application

Live App


Overview

Delhi accounts for a small stretch of the Yamuna, but a disproportionate share of its pollution load. In practice, response often begins only after visible degradation, public complaints, or manual inspection.

DRISHTI is a lightweight monitoring and decision-support platform built to make that workflow more proactive. It brings live sensor readings, anomaly detection, risk simulation, alert tracking, and issue management into one operational view.

Instead of reacting late, the platform supports a clearer loop:

Monitor -> Detect -> Predict -> Respond


What DRISHTI Does

Live Monitoring

Tracks water-quality parameters such as pH, DO, BOD, COD, turbidity, ammonia, temperature, and conductivity through a unified dashboard.


Anomaly Detection

Uses an Isolation Forest model to flag abnormal sensor patterns and generate alerts for potential pollution events.


Risk Simulation

Projects short-term pollution risk and compares baseline conditions against discharge-reduction scenarios.


Operational Workflow

Lets teams review alerts, create issues, and track follow-up actions from the same interface.



Why This Matters

River pollution is not just a data problem. It is a coordination problem.

DRISHTI is designed around a few practical gaps:

  • Monitoring is often periodic rather than continuous.
  • Illegal or intermittent discharge can be missed between inspections.
  • Agencies need one place to view readings, alerts, and follow-up actions.
  • Pollution control decisions are stronger when teams can compare baseline risk with simulated interventions.

Core Features

Dashboard

  • Sensor map with location-based visibility
  • Latest readings and time-series visualization
  • Quick inspection of drain-level pollution indicators

Alerts

  • Automatic anomaly detection from sensor readings
  • Severity-based alert generation
  • Resolution workflow for active alerts

Simulation

  • Forecast-style pollution risk projection
  • Side-by-side scenario comparison
  • Policy experimentation by reducing pollutant discharge inputs

Issue Tracking

  • Create issues tied to field observations or system events
  • Track open and closed issues
  • Support authenticated operational workflows

System Flow

Sensors / Sample Data
        |
        v
Database + Auth Layer
        |
        v
ML Detection + Risk Logic
        |
        v
FastAPI Backend
        |
        v
Streamlit Dashboard
        |
        v
Alerts, Issues, and Action

Tech Stack

Layer Stack
Frontend Streamlit, Plotly, Pandas
PostgreSQL & Auth Supabase
Backend (REST APIs) FastAPI, SQLAlchemy, Uvicorn
ML Model Scikit-learn IsolationForest, Linear Regression
Programming Language Python

Stack Breakdown

Frontend

  • Streamlit powers the dashboard UI
  • Plotly handles interactive charts and map-based visualization
  • Pandas is used for shaping and displaying sensor data

PostgreSQL & Auth

  • Supabase provides the hosted PostgreSQL layer
  • Supabase Auth enables sign-in, sign-up, and protected workflows

Backend (REST APIs)

  • FastAPI exposes endpoints for readings, sensors, alerts, issues, prediction, and simulation
  • SQLAlchemy manages models and database access

ML Model (Isolation Forest)

  • IsolationForest is used for anomaly detection on water-quality readings
  • A lightweight regression-based risk projection supports forecasting and policy simulation

Programming Language

  • Python is used across the frontend, backend, data processing, and ML layers

Project Structure

drishti/
|-- backend/        # FastAPI app, DB models, auth, ML utilities
|-- frontend/       # Streamlit dashboard and assets
|-- migrations/     # SQL migration files
|-- scripts/        # Testing, setup, and sample-data utilities
|-- supabase_client.py
|-- streamlit_app.py
`-- README.md

Use Cases

  • Continuous monitoring of river or drain segments
  • Early detection of abnormal pollution spikes
  • Comparing likely outcomes before applying mitigation measures
  • Giving field and operations teams a single place to track system events

Vision

DRISHTI is not just a dashboard. It is a prototype for how environmental monitoring systems can become more actionable: less static reporting, more real-time visibility, and faster intervention when water quality starts to deteriorate.


Note

The backend isn't implemented properly yet. We have bypassed it via the frontend. We plan to properly implement it in the future.

About

AI-Driven Sustainability Operating System for Urban Water Systems

Topics

Resources

License

Stars

Watchers

Forks

Contributors

Languages