Context: I thought about this after reading Doing good better (highly recommend). Soon after I found out about kepler.gl which made this the perfect project to test it out.
Some (back of the envelope) calculations to show that we loose 8.3 lakh babies every year.
# India rates; all data from 2011 or so. no consistent data after that :(
infant_mortality_rate = 34
crude_birth_rate = 20.4
population = 1210854977
def lives_lost(infant_mortality_rate, crude_birth_rate, population):
# One must note this number does not include anybody dying over the age of 1.
number_of_births = crude_birth_rate * population / 1000
number_of_dead = infant_mortality_rate * number_of_births /1000
return number_of_dead
l = lives_lost(infant_mortality_rate, crude_birth_rate, population)
l
lives_lost_per_min = l /(365 * 24 * 60)
lives_lost_per_min
lives_created_per_min = population * crude_birth_rate /(1000 *365 *24*60)
lives_created_per_min
life_expectancy = 68.35
qaly_per_life = 60 #something a little less than life expectancy, hacky
qaly_lost = l * qaly_per_life
qaly_lost
After lots of painful data processing here.
import pandas as pd
birth_rate = pd.read_csv("birth_rate.csv",index_col="states")
infant_mortality = pd.read_csv("infant_mortality.csv", index_col="states")
population = pd.read_csv("population.csv", index_col="states")
birth_rate[:5]
infant_mortality[:5]
population[:5]
assert len(birth_rate) == len(infant_mortality) == len(population)
lives_lost = pd.DataFrame(index=birth_rate.index)
number_of_births = pd.DataFrame(index=birth_rate.index)
for i in ["total","urban","rural"]:
number_of_births[i] = birth_rate[i] * population[i] / 1000
lives_lost[i] = infant_mortality[i] * number_of_births[i] /1000
lives_lost
lives_lost.to_csv("lives_lost.csv",index=False)
number_of_births.to_csv("number_births.csv", index=False)
import matplotlib.pyplot as plt
%matplotlib inline
lives_lost = lives_lost[:-1] # removing all india data
infant_mortality = infant_mortality[:-1]
lives_lost.plot.bar(figsize=(20,10), title="lives lost per state")
plt.show()
infant_mortality.plot.bar(figsize=(20,10), title="Infant mortality rate")
plt.show()
infant_mortality.idxmax()
infant_mortality.idxmin()
infant_mortality.hist(figsize=(20,10))
plt.show()
infant_mortality.mean()
infant_mortality.median()
infant_mortality.loc["Madhya Pradesh"]