Original News item:

New Delhi, Mar 25 Over 4.70 crore cases are pending in various courts in the country, including 70,154 in the Supreme Court, Lok Sabha was informed on Friday.]The total number of cases pending in the 25 high courts stood at 58,94,060 as on March 21 this year. The pendency in the apex court was recorded on March 2 this year.

In a written reply, Law Minister Kiren Rijju said 4,10,47,976 cases are pending in the various district and subordinate courts. The figures from Arunachal Pradesh, Lakshadweep, and Andaman and Nicobar Islands were not available on the National Judicial Data Grid, the reply noted. The total number of pending cases comes to 4,70,12,190, Rijju said.

How to make sense of this data in a graphic way?

Given the above news item and data, we can proceed as below:

Using ChatGPT & Python

Here is the prompt given to ChatGPT, free edition that created the code below. I made four refinements following the first output:

Think of yourself as an expert Python programmer and create a Python script to model how many years would it take clear the backlog of cases to 10% pending cases in various Indian courts and plot it given the following data;

import matplotlib.pyplot as plt
from matplotlib.ticker import FuncFormatter

# Define initial number of pending cases for each court
supreme_court_cases = 70154
high_courts_cases = 5894060
district_courts_cases = 41047976
total_pending_cases = 47012190

# Define yearly clearance rates for each court (as percentages)
clearance_rate_supreme_court = 0.05
clearance_rate_high_courts = 0.10
clearance_rate_district_courts = 0.15

# Lists to store the year and pending cases for each court
years = [0]
pending_cases_supreme_court = [supreme_court_cases]
pending_cases_high_courts = [high_courts_cases]
pending_cases_district_courts = [district_courts_cases]

# Function to calculate the backlog clearance for a given court
def calculate_clearance(pending_cases, clearance_rate):
return pending_cases * (1 - clearance_rate)

# Function to format large numbers with abbreviations
def format_large_numbers(x, pos):
if x >= 1e9:
return f'{x / 1e9:.1f}B'
if x >= 1e6:
return f'{x / 1e6:.1f}M'
if x >= 1e3:
return f'{x / 1e3:.1f}K'
return f'{x:.0f}'

# Model the backlog clearance for each court until reaching 10% of pending cases
while True:
# Calculate new pending cases for each court in the next year
pending_cases_supreme_court.append(calculate_clearance(pending_cases_supreme_court[-1], clearance_rate_supreme_court))
pending_cases_high_courts.append(calculate_clearance(pending_cases_high_courts[-1], clearance_rate_high_courts))
pending_cases_district_courts.append(calculate_clearance(pending_cases_district_courts[-1], clearance_rate_district_courts))

# Increment the year count
years.append(len(years))

# Stop the loop when 10% of pending cases are reached in all courts
if (pending_cases_supreme_court[-1] <= total_pending_cases * 0.1 and pending_cases_high_courts[-1] <= total_pending_cases * 0.1 and pending_cases_district_courts[-1] <= total_pending_cases * 0.1): break

#Plotting the backlog clearance for each court over the years
plt.plot(years, pending_cases_supreme_court, label='Supreme Court')
plt.plot(years, pending_cases_high_courts, label='High Courts')
plt.plot(years, pending_cases_district_courts, label='District Courts')


# Formatting y-axis with user-friendly numbers
formatter = FuncFormatter(format_large_numbers)
plt.gca().yaxis.set_major_formatter(formatter)

plt.xlabel('Years')
plt.ylabel('Pending Cases')
plt.title('Backlog Clearance in Indian Courts')
plt.legend()

# Displaying clearance rates next to the plot
plt.text(len(years) - 1, pending_cases_supreme_court[-1], f'SC({clearance_rate_supreme_court*100:.0f}%)', ha='right')
plt.text(len(years) - 1, pending_cases_high_courts[-1],
f'HC ({clearance_rate_high_courts*100:.0f}%)', ha='right')
plt.text(len(years) - 1, pending_cases_district_courts[-1],
f'DC ({clearance_rate_district_courts*100:.0f}%)', ha='right')

plt.grid()
plt.tight_layout()
plt.show()


  1. 70,154 cases in the Supreme Court
  2. 58,94,060 cases in the High Courts
  3. 4,10,47,976 cases in the District Courts

The total number of pending cases comes to 4,70,12,190. Now let us do some analysis making the following conservative assumptions:

  1. 5% clearing of cases per year in Supreme Court
  2. 10% clearing of cases per year in High Courts
  3. 15% clearing of cases per year in District Courts

The chart shows that it will take 14 years to clear the backlog of cases!
As you can see, I did a minimum preparation of the original news item to include it in the prompt. Please try out and share examples from your practice code.

Shares:

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *