Covid-19 Data Visualization

Posted on Jun 19, 2022

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.

Analysis Process

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


Data Plotting

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

Aesthetics Presentation

The aesthetics presentation of the graph such as labels, titles, color and size to make a clear vision.

ax = plt.axes()
ax.grid(linewidth=0.4, color='#8f8f8f')

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')

Data for COVID-19

Data for COVID-19

Fig: Number cases by dates in an aesthetics presentation

Pie Chart

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


About Author

Anupam Sharma

Experienced including leading, organizing, contributing and managing ability in a manner towards the growth of computer education to achieve the ultimate level. An analytical minded data scientist, eager to contribute my abilities in qualitative modeling and experimentation to...
View all posts by Anupam Sharma >

Leave a Comment

No comments found.

View Posts by Categories

Our Recent Popular Posts

View Posts by Tags

#python #trainwithnycdsa 2019 2020 Revenue 3-points agriculture air quality airbnb airline alcohol Alex Baransky algorithm alumni Alumni Interview Alumni Reviews Alumni Spotlight alumni story Alumnus ames dataset ames housing dataset apartment rent API Application artist aws bank loans beautiful soup Best Bootcamp Best Data Science 2019 Best Data Science Bootcamp Best Data Science Bootcamp 2020 Best Ranked Big Data Book Launch Book-Signing bootcamp Bootcamp Alumni Bootcamp Prep boston safety Bundles cake recipe California Cancer Research capstone car price Career Career Day citibike classic cars classpass clustering Coding Course Demo Course Report covid 19 credit credit card crime frequency crops D3.js data data analysis Data Analyst data analytics data for tripadvisor reviews data science Data Science Academy Data Science Bootcamp Data science jobs Data Science Reviews Data Scientist Data Scientist Jobs data visualization database Deep Learning Demo Day Discount disney dplyr drug data e-commerce economy employee employee burnout employer networking environment feature engineering Finance Financial Data Science fitness studio Flask flight delay gbm Get Hired ggplot2 googleVis H20 Hadoop hallmark holiday movie happiness healthcare frauds higgs boson Hiring hiring partner events Hiring Partners hotels housing housing data housing predictions housing price hy-vee Income Industry Experts Injuries Instructor Blog Instructor Interview insurance italki Job Job Placement Jobs Jon Krohn JP Morgan Chase Kaggle Kickstarter las vegas airport lasso regression Lead Data Scienctist Lead Data Scientist leaflet league linear regression Logistic Regression machine learning Maps market matplotlib Medical Research Meet the team meetup methal health miami beach movie music Napoli NBA netflix Networking neural network Neural networks New Courses NHL nlp NYC NYC Data Science nyc data science academy NYC Open Data nyc property NYCDSA NYCDSA Alumni Online Online Bootcamp Online Training Open Data painter pandas Part-time performance phoenix pollutants Portfolio Development precision measurement prediction Prework Programming public safety PwC python Python Data Analysis python machine learning python scrapy python web scraping python webscraping Python Workshop R R Data Analysis R language R Programming R Shiny r studio R Visualization R Workshop R-bloggers random forest Ranking recommendation recommendation system regression Remote remote data science bootcamp Scrapy scrapy visualization seaborn seafood type Selenium sentiment analysis sentiment classification Shiny Shiny Dashboard Spark Special Special Summer Sports statistics streaming Student Interview Student Showcase SVM Switchup Tableau teachers team team performance TensorFlow Testimonial tf-idf Top Data Science Bootcamp Top manufacturing companies Transfers tweets twitter videos visualization wallstreet wallstreetbets web scraping Weekend Course What to expect whiskey whiskeyadvocate wildfire word cloud word2vec XGBoost yelp youtube trending ZORI