Indian Healthcare Analysis Part-1: How prepared were we for the Epidemic?

Anmol Hans
Analytics Vidhya
Published in
5 min readApr 22, 2021

Covid struck India and caught us unprepared again. We all are witnessing the complete breakdown of Indian Healthcare infrastructure due to the 2nd wave. The entire nation is gasping for oxygen and looking for beds while we watch it helplessly. So I have decided to look into the Health Infra that we had and how prepared we were for this day.

Population Analysis

Before Analysing the medical infra of the country it is important to analyze the population of Indian states. I will download the population data of India from Kaggle.

Import pyforest
import plotly.express as px
pop=pd.read_csv("Population_density.csv")

We will need to rename 3 columns for simplification.

pop.rename(columns={'State or union territory': 'States'}, inplace=True)
pop.rename(columns={'Density[a]': 'Density'}, inplace=True)
pop.rename(columns={'Population\n(%)': 'Population'}, inplace=True)
fig = px.bar(pop.sort_values(by="Population", ascending=True,inplace=True), x=pop['Population'], y=pop['States'], orientation='h')
fig.update_layout(uniformtext_minsize=4, uniformtext_mode='hide', autosize=False,
xaxis_title="Population",
yaxis_title="States",
width=500,
height=800,
title_text = 'Pop of India ')
fig.show()

Observation: U.P is the most populated state of India. it is almost double as populated as the 2nd most populated state of India. West Bengal and Bihar are also extremely populated states of India.

Data Downloading

I have downloaded the data from Kaggle, the data has been scrapped from the pib.gov.in website and is copyright-free. I have downloaded the Zip file. On unzipping, I have Multiple CSV files with Healthcare data.

Health Infra Analysis

We can open our notebook and start coding. I will import all the libraries and convert the CSV file into a data frame for the file that we will analyze in this part


import numpy as np
state_data= pd.read_csv('Hospitals_and_Beds_statewise.csv')
state_data.head()

Column Abbreviations

Unnamed:0 =States, PHC=Public Health Care center , CHC= Community Health Center, SDH=Sub District Hospital, DH= District Hospital , Unnamed:6= Beds

Total hospitals and beds in India can be found by querying the last row of the data frame.

state_data.head(37).reset_index()
all_india_beds_PHC = state_data.loc[36,["PHC", 'CHC', 'SDH', 'DH', 'Beds']]
all_india_beds_PHC

Our country has 7 lakh beds and 30,000 primary health care centers.

Data Cleaning

We need to rename column 1 and column 6. We will also need to drop the last row(36th) of the table which is the sum total for India for all columns.

state_data.rename(columns={'Unnamed: 0': 'States'}, inplace=True)
state_data.rename(columns={'Unnamed: 6': 'Beds'}, inplace=True)
state_data.fillna(0,axis =0, inplace=True)
state_data.drop([36], inplace=True)

Primary Health Care Centers

Another important requirement is to convert the data type from object to INT. After that, we can start visualization for the primary health care centers in India state-wise.


data_type_list = {
"PHC" : int,
"CHC" : int,
"SDH" : int,
"DH" : int,
"Total" : int,
"Beds" : int
}state_data = state_data.astype(data_type_list)
state_data.sort_values(by='PHC', ascending=True, inplace=True)
fig = px.bar(state_data, x=state_data['PHC'], y=state_data['States'], orientation='h')
fig.update_layout(uniformtext_minsize=5, uniformtext_mode='hide', autosize=False,
xaxis_title="Primary Health Centers",
yaxis_title="states",
width=800,
height=1200,
title_text = 'Total Primary Health Centers in india '+all_india_beds_PHC[0])
fig.show()

Observation: Rajasthan and Karnataka are the best performers. Both have an average population(6–7 crore) states and are still making it to the top 4. While the performance of Delhi, Punjab, Haryana is dismal.

Community Health Centers

fig = px.bar(state_data.sort_values(by="CHC", ascending=True,inplace=True), x=state_data['CHC'], y=state_data['States'], orientation='h')
fig.update_layout(uniformtext_minsize=5, uniformtext_mode='hide', autosize=False,
xaxis_title="Community Health Centers(CHCs)",
yaxis_title="states",
width=800,
height=1200,
title_text = 'Total Community Health Centers(CHCs) in india '+all_india_beds_PHC[1])
fig.show()

Observation: Rajasthan got even better in this one, while West Bengal has shown a significant improvement. Punjab, Telangana, Haryana, Bihar, Delhi are performing poorly considering the population.

Sub-District/Divisional Hospitals

fig = px.bar(state_data.sort_values(by="SDH", ascending=True,inplace=True), x=state_data['SDH'], y=state_data['States'], orientation='h')
fig.update_layout(uniformtext_minsize=4, uniformtext_mode='hide', autosize=False,
xaxis_title="Sub-District/Divisional Hospitals(SDHs)",
yaxis_title="states",
width=800,
height=1200,
title_text = 'Total Sub-District/Divisional Hospitals(SDHs) in india '+all_india_beds_PHC[2])
fig.show()

Observation: Tamil Nadu has done well along with Karnataka and Kerala. Delhi has again been very disappointing.

Total Hospitals in India

fig = px.bar(state_data.sort_values(by="Total", ascending=True,inplace=True), 
x=state_data['Total'],
y=state_data['States'],
orientation='h')
fig.update_layout(uniformtext_minsize=4, uniformtext_mode='hide', autosize=False,
xaxis_title="Total PHC,CHC,SDH,DH",
yaxis_title="states",
width=800,
height=1200,
title_text = 'Total PHC,CHC,SDH,DH in india ')
fig.show()

Total beds in India

Let’s talk about the most important parameter, this is where our Medical Infra has failed us. Totals beds in India are, 7 lakh.

fig = px.bar(state_data.sort_values(by="Beds", ascending=True,inplace=True), 
x=state_data['Beds'],
y=state_data['States'],
orientation='h')
fig.update_layout(uniformtext_minsize=4, uniformtext_mode='hide', autosize=False,
xaxis_title="Total Beds",
yaxis_title="states",
width=800,
height=1200,
title_text = 'Total Beds in india ')
fig.show()

Observation: Total active cases in India at the moment are 2,416,688, while the total beds India has are 7 lakhs 39 thousand Which is less than 1/3rs of the total cases. This just shows how stressed our healthcare infra is at the moment. Obviously, we have added a lot of beds by making temporary hospital facilities.

Tamil Nadu has the highest number of beds and they are doing well in this 2nd wave compared to the other states. Punjab has 13k Total beds while 38k active cases at the moment and we are yet to see a peak in Punjab.

Conclusion

The only state that has done well overall is Rajasthan and that is also reflected in their performance of covid management, they have handled wave 1 and wave 2 better than every other Indian state and are also topping the vaccination charts. Punjab according to me has the worst health infrastructure in India. U.P has topped all the charts but they have an overwhelmingly large population.

--

--