Aadhaar Stress 

A comprehensive analysis platform for Aadhaar service stress risk across Indian districts. Uses a machine learning model to predict risk scores, with an interactive Streamlit dashboard, a FastAPI backend, and AI-powered policy recommendations via the Gemini API.

DISCIPLINE

  • Machine Learning
  • Data Analytics
  • GovTech

TABLE OF CONTENTS

  • (01) — Features
  • (02) — API Endpoints
  • (03) — Tech Stack
Aadhaar Stress screenshot

This project provides a comprehensive analysis of Aadhaar service stress risk across different districts. It uses a machine learning model to predict risk scores based on various operational data points, with a detailed Streamlit dashboard for in-depth analysis and a lightweight FastAPI backend with a simple frontend for quick risk checks.

Features

  • Risk Prediction: A machine learning model predicts the service stress risk score for a given district and date.
  • Interactive Dashboard: A Streamlit application provides a rich user interface to visualize risk trends, compare districts, and get detailed explanations.
  • AI-Powered Recommendations: The application uses Google's Gemini API to generate policy recommendations for mitigating service stress.
  • REST API: A FastAPI backend exposes several endpoints to access the risk data and model predictions.
  • Minimalist Frontend: A simple HTML/JavaScript frontend to interact with the FastAPI backend.

API Endpoints

The FastAPI backend provides a rich set of endpoints:

  • GET /states — Get a list of all states.
  • GET /districts/{state} — Get districts for a given state.
  • GET /risk — Get the risk score and metrics for a given selection (state, district, date).
  • GET /risk-verdict/{risk_score} — Get a qualitative risk verdict (LOW, MEDIUM, HIGH).
  • GET /top-districts — Get the top 10 high-risk districts.
  • GET /policy-recommendation/{state}/{district}/{date} — Generate an AI policy recommendation.
  • GET /risk-explanation/{state}/{district}/{date} — Generate a detailed risk explanation.
  • GET /download-ranked-data — Download a CSV of ranked district stress data.

Tech Stack

  • Dashboard: Streamlit (Python)
  • Backend: FastAPI, Uvicorn
  • ML Model: Scikit-Learn (.pkl artifact)
  • AI: Google Gemini API
  • Frontend: HTML, JavaScript