Infant Mortality in India

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.

In [1]:
# India rates; all data from 2011 or so. no consistent data after that :(
infant_mortality_rate = 34
crude_birth_rate = 20.4
population = 1210854977
In [2]:
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  
In [3]:
l = lives_lost(infant_mortality_rate, crude_birth_rate, population)
l
Out[3]:
839849.0120472
In [4]:
lives_lost_per_min = l /(365 * 24 * 60)
lives_lost_per_min
Out[4]:
1.5978862481872147
In [5]:
lives_created_per_min = population * crude_birth_rate /(1000 *365 *24*60)
lives_created_per_min
Out[5]:
46.996654358447486

QALY calculation

QALY stands for Quality adjusted life years. It is a way of measuring how efficient an intervention is. read more about it here.

In [6]:
life_expectancy = 68.35
qaly_per_life = 60 #something a little less than life expectancy, hacky
In [7]:
qaly_lost = l * qaly_per_life
qaly_lost
Out[7]:
50390940.722832

Infant mortality, Population, Birth rate by State

After lots of painful data processing here.

In [8]:
import pandas as pd
In [9]:
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")
In [10]:
birth_rate[:5]
Out[10]:
Unnamed: 0 total rural urban
states
Andhra Pradesh 0 16.4 16.7 15.8
Arunachal Pradesh 1 18.9 19.5 16.1
Assam 2 21.7 22.8 15.0
Bihar 3 26.8 27.7 21.1
Chhattisgarh 4 22.8 24.1 18.3
In [11]:
infant_mortality[:5]
Out[11]:
urban total rural
states
Andhra Pradesh 24 34 38
Arunachal Pradesh 23 36 38
Assam 22 44 46
Bihar 29 38 39
Chhattisgarh 31 39 41
In [12]:
population[:5]
Out[12]:
Unnamed: 0 rural urban total
states
Andhra Pradesh 0 34776389 14610410 49386799
Arunachal Pradesh 1 1066358 317369 1383727
Assam 2 26807034 4398542 31205576
Bihar 3 92341436 11758016 104099452
Chhattisgarh 4 19607961 5937237 25545198
In [13]:
assert len(birth_rate) == len(infant_mortality) == len(population)
In [14]:
lives_lost = pd.DataFrame(index=birth_rate.index)
number_of_births = pd.DataFrame(index=birth_rate.index)
In [15]:
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
In [16]:
lives_lost
Out[16]:
total urban rural
states
Andhra Pradesh 27538.079122 5540.267472 22069.096459
Arunachal Pradesh 941.487851 117.521741 790.171278
Assam 29795.083965 1451.518860 28115.217259
Bihar 106014.881917 7194.729990 99756.453311
Chhattisgarh 22714.790062 3368.194550 19374.626264
Goa 150.521844 85.693923 66.759451
Gujarat 36445.134276 8658.071413 29004.693124
Haryana 17317.583692 4368.883092 12712.206430
Himachal Pradesh 2745.840800 137.366124 2547.620625
Jammu & Kashmir 4725.562594 939.678335 3962.006100
Jharkhand 21907.419789 3065.334770 19029.327944
Karnataka 25806.653453 7272.071104 18715.932832
Kerala 4777.066723 2294.629344 2498.372305
Madhya Pradesh 85677.846577 12914.662118 71215.282420
Maharashtra 33948.285999 10239.879189 24080.736149
Manipur 405.237169 103.435096 320.227776
Meghalaya 2742.295503 216.743800 2456.810804
Mizoram 459.180711 100.860404 334.702095
Nagaland 332.388336 106.313869 222.953702
Odisha 34351.700011 3262.302965 31529.458699
Punjab 8680.890460 2639.303255 6223.096090
Rajasthan 68294.807783 10791.437805 58401.399168
Sikkim 162.169251 36.935509 127.502721
Tamil Nadu 18397.492650 7332.662400 11243.336180
Telangana 19092.733065 5552.335320 13447.649999
Tripura 1207.983910 347.661405 831.641462
Uttarakhand 6362.432994 1414.892832 4847.053915
Uttar Pradesh 225108.583371 34492.572838 195047.437712
West Bengal 35141.304275 7552.543319 26272.365243
A& N Islands 71.244763 5.050778 35.563950
Chandigarh 205.390570 198.311879 3.339763
D & N Haveli 143.154798 53.381778 89.652614
Daman & Diu 110.920632 89.633560 18.155038
Delhi 4683.835539 4313.204886 170.969136
Lakshadweep 23.152254 17.716864 5.430144
Puducherry 173.465467 95.508336 85.995520
All India 839849.012047 147448.494875 700182.285910
In [17]:
lives_lost.to_csv("lives_lost.csv",index=False)
number_of_births.to_csv("number_births.csv", index=False)

Analysis

In [18]:
import matplotlib.pyplot as plt
%matplotlib inline
In [19]:
lives_lost = lives_lost[:-1]  # removing all india data
infant_mortality = infant_mortality[:-1]
In [20]:
lives_lost.plot.bar(figsize=(20,10), title="lives lost per state")
plt.show()
In [21]:
infant_mortality.plot.bar(figsize=(20,10), title="Infant mortality rate")
plt.show()
In [22]:
infant_mortality.idxmax()
Out[22]:
urban            Odisha
total    Madhya Pradesh
rural    Madhya Pradesh
dtype: object
In [23]:
infant_mortality.idxmin()
Out[23]:
urban           Goa
total           Goa
rural    Chandigarh
dtype: object
In [24]:
infant_mortality.hist(figsize=(20,10))
plt.show()
In [25]:
infant_mortality.mean()
Out[25]:
urban    20.722222
total    26.166667
rural    28.083333
dtype: float64
In [26]:
infant_mortality.median()
Out[26]:
urban    20.5
total    24.5
rural    25.0
dtype: float64
In [27]:
infant_mortality.loc["Madhya Pradesh"]
Out[27]:
urban    33
total    47
rural    50
Name: Madhya Pradesh, dtype: int64

Kepler.gl Visualization

download (right-click -> save as) this and go to here. for an interactive visualization of infant mortality. you can see how to generate these here