Trend of Novel Covid-19 in India — Detailed Analysis in Python
Tags: Data Analysis, Machine Learning, Data Visualization, Python, Data Science

From the last few months, Countries around the world have been fighting to a unknown deadly virus called Covid 19. Scientists around the globe are conducting a lot research to create a vaccine for this deadly virus. Till now more than 3 million are people are affected due this virus in which more than 200 thousands death are recorded and also more than 900 thousands are recovered from this virus.

In India where the population is around 1.33 billion and health facility is not up to global standards, According to WHO report, India has 1.34 doctors per 1000 citizen which rank 67 among 133 developing nations. Despite of this India has done a tremendous progress so far to contain the virus.

Today, I will be doing the analysis of Covid-19 cases growing in India. I will be using the kaggle data set which is publicly available. I’m using jupyter notebook and python libraries like pandas, numpy, matplotlib and seaborn.

Importing and Understanding the Data

First let’s import necessary libraries like pandas, matplotlib, seaborn and the COVID-19 regional data set of India.

The data set contains 1350 rows and 9 columns. The columns of the data set like Sno, Date, time, state/union territory , ConfirmedIndianNational, ConfirmedForeignNational, Cured, Deaths, Confirmed.

Now we check the data integrity by running the info method and from the below output we can see that there date and time column is object data type and confirmedIndianNational/ confirmedForeignNational are object type which is count of Indian and Foreign patients.

Next step is convert the “Date” column datatype into the datatime object and dropped the unnecessary columns like Sno, confirmedIndianNational, confirmedForeignNational as it’s not required for our analysis.

We have few columns left in our data frame after dropping unnecessary columns. Now we are interested in the every day count of the data irrespective of the state as we are doing the analysis for the country. So we will group by the data frame by date and get the count of cases every day.

Now we have the cleared data from the data set. Let’s add some useful information in the data frame which will help our analysis. The above data frame has numbers in series not for the daily count. Below method get_daily_report will give the number of daily new cases, new recoveries and new deaths. I have also added few columns for additional analysis like active case after each day, growth percentage in the active cases, Death and cured percentage as well.

Below is our final data frame which is ready for the analysis. It has all the necessary columns added for the analysis.

Data Analysis

Let’s add method for bar plot and line plot using matplotlib and seaborn libraries .

First, we have plotted the line plot of the total corona virus cases grows till 26 Apr 2020. we can notice that the graph is exponentially increasing over the time. Total number of confirmed cases is crossed the 25000 so far.

We can also check the corona virus cases on logarithmic scale as well due the skewness in the graph due to large value and second reason is logarithmic graph shows the percentage change or the multiplicative factor.

Now we can check that at which rate the virus is growing in the country. the below line plot summaries that virus cases is growing by 8.6% everyday in the country. We can also see the trend that growth percentage of virus has started decreasing.

Below plotted graph shows that number of daily new confirmed cases of virus in the country. On the average of 1000 cases are reported from the last one week.

One of the important aspect of the analysis is about the recovery and the mortality rate of this disease. Mortality rate of the this virus is globally captured between 20–25%. Is the same trend is followed in India as well. Let’s check this out.

Infected people has started recovering from the virus on the avarage of 650 per day from the last week.

Currently total of around 6000 infected people has recovered from this deadly virus and this recovery is an exponential growth in recovery which certainly as good sign for the nation.

Now let’s come to the mortality rate of this deadly virus in the india. As of now more than 800+ deaths and around 6000 people have recovered from the disease in the nation. If we check the mortality rate which is 12.3% which is good compared to global average of the mortality rate 20–25%.

Below pie chart shows that out of total closed cases (Recovered + Deaths), 87.7% got recovered and 12.3% death recorded.

Now, we can the compare the growth rate of the new cases and the growth rate of the recovering of the cases in the nation. Below graph shows that how both the graph are varying with time.

Below bar plot shows that daily new deaths in India. if you notice the average of daily deaths is 35 from the last weeks.

Below line plots of recovery rate and death rate shows that how the situation are coming under control in controlling the mortality rate. After reaching the mortality rate around 25% in the beginning of month April they have contained the virus so far in very app-laudable manner. The below graph will be perfect rectangle when we will get victorious over this virus.

Hope we understand the current global crisis that’s on going in the world and maintain social distancing. Be Safe and be at Home.

Thanks for Reading !!