Data AnalyticsPortfolio projects with Indian public data

Court pendency in Gautam Buddha Nagar from the NJDG dashboard

PK
Pankit Kumar
Sr. Data Scientist at Parexel (a Goldman Sachs–backed company) · 27 September 2026 · 5 min read
In this article (7 sections)

Related programme: the Data Analytics with Generative AI course (3–4 months; ₹90,000 (inclusive of GST) · EMI from ₹4,000/month).

The short answer

How many cases are pending in the district courts that serve Noida and Greater Noida, how old are they, and is the backlog growing or shrinking? The National Judicial Data Grid (NJDG) shows these figures for every district, updated continuously, but it keeps no history you can download. This project turns the live dashboard into a dated series. You take a snapshot for Gautam Buddha Nagar and a few comparison districts on a fixed schedule, then compute the age profile of pending cases, the monthly clearance rate and a simple backlog projection. The honest version of this project explains exactly what a live dashboard can and cannot give you.

The source

Open the National Judicial Data Grid and choose the district and taluka courts view. From the national screen you can drill down to a state, then to a district. For a district, the dashboard shows:

  • pending civil and criminal cases in age bands: under one year, one to three, three to five, five to ten and over ten years
  • cases instituted and cases disposed in the last month
  • counts of undated and excessively dated cases, and cases filed by women and by senior citizens
  • a delay-reason breakdown and an institution-versus-disposal view

We found no bulk download for these district figures. Record them by hand or by copying the displayed table, and log the date and time of each snapshot, because the numbers change daily. Select the district in Uttar Pradesh and check the spelling NJDG uses for it (the district is Gautam Buddha Nagar, and dashboards sometimes shorten it). Respect the site's terms, and do not script heavy automated requests against a court system.

The employer's view

Legal-tech firms, policy researchers, litigation-finance analysts and journalists all rely on NJDG. The data skills here are general: building a history from a system that only shows the present, reconciling sub-totals, and writing measures that do not mislead. A clearance rate computed from one month's institution and disposal can swing wildly. Knowing that and smoothing it properly is the kind of care that separates an analyst from someone who copies a dashboard figure into a slide.

Cleaning issues

  1. 1Snapshots, not history. Each capture is a stock at a moment. Store captured_at, district, case type, age band and count.
  2. 2Totals must reconcile. Age bands should add to the pending total for each case type, and civil plus criminal to the overall total. Record any mismatch rather than forcing it.
  3. 3Flows are last month only. Instituted and disposed counts refer to the last month on the day you look. Capture them in the first days of each month so each snapshot covers one full month.
  4. 4Undated and excessively dated cases reflect data quality in the court records. Report their share rather than dropping them.
  5. 5District boundaries. A district court establishment may include several court complexes. Say that your figures cover the district as NJDG defines it.

Code: age profile and clearance

The snapshots below are synthetic. District names are real, but every count is invented and is not NJDG data.

python
import pandas as pd

bands = ["<1", "1-3", "3-5", "5-10", ">10"]
snap = pd.DataFrame({
    "month": ["2026-06"] * 2 + ["2026-07"] * 2 + ["2026-08"] * 2 + ["2026-09"] * 2,
    "district": ["Gautam Buddha Nagar", "Ghaziabad"] * 4,
    "<1":   [30000, 42000, 29500, 41800, 31000, 42500, 30200, 42100],
    "1-3":  [38000, 55000, 38400, 55200, 38700, 55600, 39300, 55900],
    "3-5":  [21000, 30000, 21100, 30300, 21300, 30400, 21200, 30800],
    "5-10": [15000, 24000, 15200, 24100, 15300, 24200, 15500, 24400],
    ">10":  [4000, 7000, 4050, 7100, 4100, 7150, 4150, 7200],
    "instituted_last_month": [5200, 7400, 5000, 7100, 6100, 7900, 5300, 7300],
    "disposed_last_month":   [4700, 7000, 5300, 7600, 5200, 8400, 4900, 8100],
})
snap["pending"] = snap[bands].sum(axis=1)
snap["share_over_5y_pct"] = 100 * (snap["5-10"] + snap[">10"]) / snap["pending"]
snap["clearance_rate_pct"] = 100 * snap["disposed_last_month"] / snap["instituted_last_month"]

# Three-month rolling clearance: sum of flows, not the mean of monthly ratios
roll = snap.groupby("district")[["instituted_last_month", "disposed_last_month"]].rolling(3).sum()
roll = roll.reset_index(level=0, drop=True)
snap["clearance_3m_pct"] = 100 * roll["disposed_last_month"] / roll["instituted_last_month"]

# Months to clear the current backlog at recent net disposal pace (if disposal exceeds institution)
net = roll["disposed_last_month"] / 3 - roll["instituted_last_month"] / 3
snap["months_to_clear"] = (snap["pending"] / net).where(net > 0)

cols = ["month", "district", "pending", "share_over_5y_pct", "clearance_rate_pct", "clearance_3m_pct", "months_to_clear"]
print(snap[cols].round(1).to_string(index=False))

The monthly clearance rate jumps above and below 100% from one month to the next. The three-month version pools the flows first, which is steadier and is weighted correctly. When disposal does not exceed institution, "months to clear" is left blank rather than negative or infinite. Say plainly that at the current pace the backlog does not shrink. Where it does shrink, a result in hundreds of months is still a finding: it says the net pace is tiny compared with the stock.

Analysis plan

  1. 1Capture Gautam Buddha Nagar, Ghaziabad and two or three comparison districts on the second day of each month, for as long as the project runs.
  2. 2Reconcile every snapshot and log failures.
  3. 3Chart the age profile as a stacked bar per snapshot, and the share of cases over five years old as a line.
  4. 4Compute monthly and three-month clearance rates, and compare pending counts between snapshots to check the flows (pending should change by roughly instituted minus disposed, and differences point to transfers or data corrections).
  5. 5Add the delay-reason breakdown from the latest snapshot as context, not as a cause.

What to deliver

  • Stacked bars: pending cases by age band, per district and snapshot.
  • Clearance chart: monthly and three-month clearance rates, with a 100% reference line.
  • Flow check table: change in pending against instituted minus disposed, and the gap.
  • README: NJDG view and path used, capture schedule and times, spelling of each district, reconciliation results, the "flows are last month" caveat and a note that snapshots cannot recreate history before your first capture.

Interview questions

  • Why is a three-month clearance rate computed from summed flows better than an average of monthly rates?
  • Pending fell by more than disposed minus instituted. What could explain the gap?
  • What does a high share of cases over ten years old tell you, and what does it not?
  • How would you compare two districts of very different size fairly?
  • Why must a live dashboard be sampled on a fixed schedule?

Local data projects like this one suit our Data Analyst programme, which is taught live online with optional in-person labs at our Noida centre.

PK
Pankit Kumar
Lead Instructor, NeuraPath Academy

Pankit Kumar has 10 years in Data Science & AI, building and shipping production systems in regulated pharma and clinical environments. He is a freelance trainer at Boston Institute of Analytics, AnalytixLabs and Scaler, and has taught this material to thousands of working professionals.

This article is part of our Data Analytics with Generative AI programme — 3–4 months. The full analyst stack — Excel, SQL, Power BI and Python pipelines — then a generative-AI layer you can prove is right.

Explore Data Analytics with Generative AI
Counselling is free · no obligation

Not sure which programme fits?

Tell us your background and we will map it to the right entry point — including saying so when a cheaper programme is the better fit. A counsellor replies within one working day.