Visualizing Covid 19 in Different Countries

Prepared by Mahsa Sadi on 2020 - 06 - 25

In this notebook, we visualize CoVID 19 outbreak in different countries.

Note: The analyzed data sets are downloaded from Kaggle and they do not reflect the real situation.

In [1]:
import pandas
import matplotlib
import seaborn
%matplotlib inline
from matplotlib import pyplot
In [2]:
data_set = pandas.read_csv ('covid_19_india.csv')
data_set_italy = pandas.read_csv ('covid_19_italy.csv')



Visualizing Covid 19 in India



In [3]:
data_set.shape
Out[3]:
(3387, 9)
In [4]:
data_set.info ()
<class 'pandas.core.frame.DataFrame'>
RangeIndex: 3387 entries, 0 to 3386
Data columns (total 9 columns):
Sno                         3387 non-null int64
Date                        3387 non-null object
Time                        3387 non-null object
State/UnionTerritory        3387 non-null object
ConfirmedIndianNational     3387 non-null object
ConfirmedForeignNational    3387 non-null object
Cured                       3387 non-null int64
Deaths                      3387 non-null int64
Confirmed                   3387 non-null int64
dtypes: int64(4), object(5)
memory usage: 238.2+ KB
In [5]:
data_set.describe ()
Out[5]:
Sno Cured Deaths Confirmed
count 3387.000000 3387.000000 3387.000000 3387.000000
mean 1694.000000 1493.671391 96.738412 3192.308533
std 977.887008 5289.069888 423.320151 10802.658122
min 1.000000 0.000000 0.000000 0.000000
25% 847.500000 1.000000 0.000000 15.500000
50% 1694.000000 35.000000 1.000000 163.000000
75% 2540.500000 597.500000 24.000000 1870.500000
max 3387.000000 69631.000000 6531.000000 139010.000000
In [6]:
data_set.tail (5)
Out[6]:
Sno Date Time State/UnionTerritory ConfirmedIndianNational ConfirmedForeignNational Cured Deaths Confirmed
3382 3383 24/06/20 8:00 AM Tripura - - 807 1 1259
3383 3384 24/06/20 8:00 AM Uttarakhand - - 1602 30 2535
3384 3385 24/06/20 8:00 AM Uttar Pradesh - - 12116 588 18893
3385 3386 24/06/20 8:00 AM West Bengal - - 9218 580 14728
3386 3387 24/06/20 8:00 AM Cases being reassigned to states - - 0 0 8141
In [7]:
data_set ['Deaths'].sum ()
Out[7]:
327653
In [8]:
data_set ['Cured'].sum ()
Out[8]:
5059065
In [9]:
fig_dims = (100, 20)
fig, ax = pyplot.subplots(figsize=fig_dims)
plot = seaborn.barplot ( x = 'State/UnionTerritory', y = 'Deaths', ax = ax, data = data_set)
plot.axes.set_title("Deaths in States",fontsize=50)
plot.set_xlabel("Covid 19 - Deaths - India - States",fontsize=100)
plot.set_ylabel("Count",fontsize=50)
plot.tick_params(labelsize= 50)
ax.tick_params (axis = 'x', labelrotation = 90)
In [10]:
fig_dims = (100, 20)
fig, ax = pyplot.subplots(figsize=fig_dims)
plot = seaborn.barplot ( x = 'State/UnionTerritory', y = 'Cured', ax = ax, data = data_set)
plot.axes.set_title("Recoverd in States in States",fontsize=50)
plot.set_xlabel("Covid 19 - Recovered - India - States",fontsize=100)
plot.set_ylabel("Count",fontsize=50)
plot.tick_params(labelsize= 50)
ax.tick_params (axis = 'x', labelrotation = 90)