NagarikAI
Datasets · Models · Papers

References & data

NagarikAI is grounded in three public datasets and two trained models. This page surfaces every source we lean on, the trend each one reveals, and where to find the raw file in this repo.

Live charts · real Bengaluru data

What the numbers actually say

Every chart below is rendered from the same files the production agents read. No mock data. Pick a year to filter the time-series.

Bengaluru monthly rainfall vs road complaints
5 years · 60 months · all 243 BBMP wards
source · public/data/rain_complaints_monthly.json
2025 forecast — model vs naive baseline
source · public/data/forecast.json
Top 12 wards by complaint backlog
source · public/data/ward_backlog.json
MILP optimizer · backlog cleared per department
source · public/data/optimization.json
#1 · Dataset

BBMP citizen-issue backlog (H1 2025)

17,481 reports
Trend we use

Pothole reports peak Jul–Sep, lagging the SW monsoon by ~3 weeks. Garbage stays roughly flat. Streetlight outages spike in Dec when daylight shrinks.

Top 3 issue types
Pothole32.4%
Garbage27.1%
Streetlight14.8%
FIFO total km
1,019.25
MILP total km
107.05
Reduction
89.5%
Backtest @
800 issues / 12 crews
source · data/processed/backtest.json
repo · apps/web/public/data/ward_backlog.json
#2 · Dataset

KGIS BBMP ward polygons

243 polygons (GeoJSON, EPSG:4326)
What it powers

Every submitted report is point-in-polygon checked against these 243 polygons. Outside → 422 outside_bbmp_jurisdiction. Inside → we set issue.ward + use it for routing, leaderboards, and hotspot prediction.

Coverage check (live)
Polygons indexed243
Vertex count~38k
Avg area3.2 km²
Reject latency p508ms
repo · data/processed/wards.geojson
#3 · Dataset

IMD Bengaluru monthly rainfall

60 ward-months × 243 wards = 14,580 obs
Trend we use

log(road_complaints + 1) regresses on rainfall_mm with a 1-month lag. Coefficient is positive and significant (p<0.01) — every extra 10mm in the prior month adds ~6% to next-month road complaint volume.

Predictive model
AlgorithmHistGradientBoostingRegressor
Featuresward_FE + month_FE + rain + rain_lag1
Train R²0.871
Hotspots150 forecast points
data/processed/hotspots.geojson
repo · data/raw/rainfall.csv
#4 · Model

Pothole defect CNN (closure verification)

5,323 images (3,518 train · 620 val · 1,185 test)
Why we trained our own

CLIP zero-shot can spot 'pothole vs road' but not 'patched pothole vs still-broken pothole'. We train a 24k-param CNN (3× conv + GAP + FC) on real before/after pairs so the resolution agent doesn't accept fake closures.

Held-out test set
Train acc94.5%
Val acc94.2%
Test acc92.0%
Params24,065
repo · data/processed/defect_cnn.{json,pt}
#5 · Model

106-fixture routing-ablation suite

106 LLM router fixtures + 16 prompt-injection attacks
Results

101/106 LLM router calls agreed with the SOP table; the remaining 5 were correctly caught by guardrails fallback. 0/16 prompt-injection attempts succeeded. 0/106 hallucinated departments.

Scores
LLM agreement95.3%
Injection bypasses0 / 16
Department hallucinations0 / 106
Avg LLM latency~620ms
repo · apps/api/scripts/eval_router.py + data/processed/routing_ablation.json
Live evaluation · run on 2026-06-26

Gemini 2.5 Flash on video — all 7 categories

We uploaded one Creative-Commons clip per category to the Gemini Files API and asked it for the same JSON the VisionAgent uses in production. Below is the unedited output. 7/7 type-match; median 1.9s post-upload latency.

7 / 7 match
Expected → GeminiSevConfHazardGemini notesmsWatch
pothole
40.90vehiclesLarge pothole filled with water on a busy road, causing traffic to slow down and vehicles to navigate carefully.3521 .mp4
garbage
40.95sanitationLarge pile of mixed waste, including plastic bags and other refuse, creating a significant environmental and sanitation issue.1434 .mp4
streetlight
20.90noneStreetlight is flickering, possibly due to a loose connection or faulty bulb. Needs inspection and repair.1913 .mp4
water_leak
20.90noneA water leak is visible on a white pipe against a brick wall, with rust-colored liquid dripping slowly.2401 .mp4
sewage
40.90sanitationThere is a large amount of foamy discharge from multiple pipes draining into the river — likely untreated sewage.2633 .mp4
tree_fall
30.90pedestriansA fallen tree is blocking a path in a forest area, potential obstruction for pedestrians.1905 .mp4
encroachment
20.80pedestriansStreet vendors and parked motorcycles are encroaching on the road, narrowing the usable carriageway.1475 .mp4
script · apps/api/scripts/probe_gemini_videos.py · raw → data/processed/gemini_video_probes.json

External APIs & SDKs cited in the agent loop