Covid-19 Data Visualization
The skills I demoed here can be learned through taking Data Science with Machine Learning bootcamp with NYC Data Science Academy.
Data Science Introduction
Data has told us that the world has changed in Covid-19 Pandemic. In past over two years, many scientists, biologists, and many others have been trying to stop or reduce the speed of covid virus spreading. It is an analysis opportunity to know the reason of spreading of virus. This project will tell, how to preprocess and merge datasets to calculate needed measures and prepare them for an Analysis of spreading of covid. It feels surreal to imagine how the virus began to spread from one person that is patient zero to four million today.
The dataset is of Covid 19 cases report is showing as following: Daily Confirmed, Total Confirmed, Daily Recovered, Total Recovered, Daily Deceased, Total Deceased.
Loading the Data sets
- Importing Libraries - libraries like pandas, numpy, matplotlib
- Loading and show the dataset - loading covid-19 data set file
Exploring the Train Data sets
- Check the dataset by rows and columns - know the structure of data set
- See the features in the Dataset - find the data type and number of observations in each column
Variables in Data set are stored to plot the graphs.
- ‘Daily Confirmed’ corona virus cases stored in a variable
- ‘Daily Recovered’ corona virus cases stored in a variable
- ‘Daily Deceased’ corona virus cases stored in a variable
- ‘Date’ column stored in a variable
Y = datadf.iloc[61:,1].values # Confirmed
R = datadf.iloc[61:,3].values # Recovered
D = datadf.iloc[61:,5].values # Deceased
X = datadf.iloc[61:,0] # Stores
The plot function takes two arguments that are X-axis values and Y-axis values plot. X-axis will pass the ‘Dates’ and Y-axis has ‘Number of Confirmed Cases’ to plot. Number of cases by dates are showing in this graph.
Fig: Number of cases by dates
The aesthetics presentation of the graph such as labels, titles, color and size to make a clear vision.
ax = plt.axes()
ax.set_ylabel('Number of Confirmed Cases\n', size=20,color='#4bb4f2')
plt.title("COVID-19 IN : Daily Confirmed\n", size=30,color='#28a9ff')
ax.plot(X,Y, color='#1F77B4', marker='o', linewidth=4, markersize=15, markeredgecolor='#035E9B')
Fig: Number cases by dates in an aesthetics presentation
This Pie Chart is use to understand the how the virus is spreading based on Travel, Place Visit and Unknown reason the Pie Chart is required.
slices = [62, 142, 195]
activities = ['Travel', 'Place Visit', 'Unknown']
exp = [0.2,0.02,0.02]
plt.pie(slices,labels=activities, textprops=dict(size=15,color='black'), radius=1, colors=cols, autopct='%2.2f%%', explode=exp, shadow=True, startangle=90)
Main reason is shown by pie chart is unknown with 48.87% and place visit is next following by travel. People mobility is biggest reason of increasing of covid cases.
Data Science Conclusion
Covid-19 Cases have been dramatically affected by the many reasons. There are variations mobility of people is creating the prominent issues in each of the counties. The visualizations of the spreading variations that can be helpful to understand how the pandemic affected rapidly in each country.
- Cases are increasing by the time
- Chart is showing daily confirm cases are rapidly increasing by place visiting (35.59%) and traveling (15.54%)
- It is also clearly visible that unknown reason of cases (48.87%) is dangerous