SlideShare uma empresa Scribd logo
1 de 16
Baixar para ler offline
Unraveling The Meaning From
COVID-19 Dataset Using
Python
A Tutorial for beginners
Introduction
Pandas: Open Source Python Library that allows us to practice various tools
for data analysis. Majorly used for Data Analysis and Manipulation.
Seaborn: Another Python Library for Data Visualization, based on Matplotlib.
Provides a wide range of Graphics for presentation purpose.
Matplotlib: Python Library for multi-platform Data Visualization. Widely used
for creating, manipulating and plotting interactive visualizations.
The Corona Virus – COVID-19 outbreak has brought the whole world to a stand
still position, with complete lock-down in several countries. Salute! To every
health and security professional. Today, we will attempt to perform a single data
analysis with COVID-19 Dataset Using Python. Here’s the link for Data Set
available on Kaggle. Following are the the Python Libraries we’ll be implementing
today for this exercise.
What Data Does It Hold
Sno: Serial Number.
ObservationDate: Date of Observation in mm/dd/yyyy format.
Province/State: Province or State of the case.
Country/Region: Country or region of the case.
Last Update: UTC time format for when was the row updated.
Confirmed: Cumulative number of confirmed cases
Deaths: Cumulative number of deaths cases
Recovered: Cumulative number of recovered cases
The available dataset has details of number of cases for COVID-19, on daily basis.
Let us begin with understanding the columns and what they represent. Column
Description for the Dataset:
These are the columns within the file, most of our work will working around
three columns which are Confirmed, Deaths and Recovered.
Let Us Begin: Firstly, we’ll import our first library, pandas and read the source file.
import pandas as pd
df = pd.read_csv("covid_19_data.csv")
Now that we have read the data, let us print the head of the file, which will print top
five rows with columns.
df.head()
As you can see in the above screenshot, we have printed the top five rows of the data file,
with the columns explained earlier.
Let us now get into some dept of the data, where we can understand the mean and
standard deviation of the data, along with other factors.
df.describe()
Describe function in pandas is used to return the basic details of the data, statistically.
We have our mean, which is “1972.956586” for confirmed cases and Standard Deviation is “10807.777684”
for confirmed cases. Mean and Standard Deviation for Deaths and Recovered columns is listed, too.
Let us now begin with plotting the data, which means to plot these data points on graph or histogram.
We used pandas library until now, we’ll need to import the other two libraries and proceed.
import seaborn as sns
import matplotlib.pyplot as plt
We now have imported all three libraries. We will now attempt to plot our data on a graph and output
will reflect figure with three data points on a graph and their movements towards the latest date.
plt.figure(figsize = (12,8))
df.groupby('ObservationDate').mean()['Confirmed'].plot()
df.groupby('ObservationDate').mean()['Recovered'].plot()
df.groupby('ObservationDate').mean()['Deaths'].plot()
Code Explanation: plt.figure with initial the plot with mentioned width and height.
figsize is used to define the size of the figure, it takes two float numbers as parameters,
which are width and height in inches. If parameters not provided, default will be
scParams, [6.4, 4.8].
Then we have grouped Observation Data column with three different columns, which
are Confirmed, Recovered and Deaths. Observation goes horizontal along with the
vertical count.
Above code will plot the three columns one by one and the output after execution will
be as shown in following image.
READ THE FULL ARTICLE: https://www.datatobiz.com/blog/unraveling-the-u-meaning-from-covid-
19-dataset-using-python-a-tutorial-for-beginners/
This data reflects the impact of COVID-19 over the globe, distributed in three columns. Using
the same data, we can implement prediction models but the data is quite uncertain and
does not qualify for prediction purpose. Moving on we will focus on India as Country and
analyze the data
Country Focus: India
Let us specifically check the data for India.
ind = df[df['Country/Region'] == 'India']
ind.head()
Above lines of code will filter out columns with India as Country/Region and place those
columns in “ind” and upon checking for the head(), it will reflect the top five columns. Check
the below attached screenshot.
Let’s plot the data for India:
plt.figure(figsize = (12,8))
ind.groupby('ObservationDate').mean()['Confirmed'].plot()
ind.groupby('ObservationDate').mean()['Recovered'].plot()
ind.groupby('ObservationDate').mean()['Deaths'].plot()
Similar to earlier example, this code will return a figure with the columns plotted on
the figure. Output for above code will be:
This is how Data is represented graphically, making it easy to read and understand.
Moving forward, we will implement a Satterplot using Seaborn library. Our next figure
will place data points, with respect to sex of the patient.
Code: Firstly we’ll make some minor changes in variables.
df['sex'] = df['sex'].replace(to_replace = 'male', value = 'Male')
df['sex'] = df['sex'].replace(to_replace = 'female', value = 'Female')
Above code simply changes the variable names to standard format. Then we’ll fill the
data points into the figure, plotting.
plt.figure(figsize = (15,8))
sns.scatterplot(x = 'longitude', y = 'latitude', data = df2, hue = 'sex', alpha = 0.2)
Code Explanation: The “x and y” defines the longitude and latitude. data defines the
data frame or the source, where columns and rows are variables and observations,
respectively. The hue defines the variable names in the data and here these variables
will be produced with different colors. alpha, which takes float value decides the
opacity for the points. Refer the below attached screenshot for proper output.
Future Scope: Now that we have understood how to read raw data and present
it in readable figures, here the future scope could be implementing a Time
Series Forecasting Module and getting a Prediction. Using RNN, we could
achieve a possibly realistic number of future cases for COVID-19. But at
present, it could be difficult to get realistic prediction as the data we posses
now is too uncertain and too less.
But considering the current situation and the fight we have been giving, we
have decided not to implement Prediction Module to acquire any number
which could lead to unnecessary unrest.
Read the full article
https://www.datatobiz.com/blog/unraveling-the-u-meaning-from-
covid-19-dataset-using-python-a-tutorial-for-beginners/

Mais conteúdo relacionado

Mais procurados

Introduction of Data Structure
Introduction of Data StructureIntroduction of Data Structure
Introduction of Data StructureMandavi Classes
 
Data Types | CS8251- Programming in c | Learn Hub
Data Types | CS8251- Programming in c | Learn HubData Types | CS8251- Programming in c | Learn Hub
Data Types | CS8251- Programming in c | Learn HubLearn Hub
 
introduction to Data Structure and classification
 introduction to Data Structure and classification introduction to Data Structure and classification
introduction to Data Structure and classificationchauhankapil
 
Unit iv(dsc++)
Unit iv(dsc++)Unit iv(dsc++)
Unit iv(dsc++)Durga Devi
 
Chapter 10: hashing data structure
Chapter 10:  hashing data structureChapter 10:  hashing data structure
Chapter 10: hashing data structureMahmoud Alfarra
 
Phd coursestatalez2datamanagement
Phd coursestatalez2datamanagementPhd coursestatalez2datamanagement
Phd coursestatalez2datamanagementMarco Delogu
 
Presentation on data preparation with pandas
Presentation on data preparation with pandasPresentation on data preparation with pandas
Presentation on data preparation with pandasAkshitaKanther
 
Presentation on basics of python
Presentation on basics of pythonPresentation on basics of python
Presentation on basics of pythonNanditaDutta4
 
SQL Joins and Query Optimization
SQL Joins and Query OptimizationSQL Joins and Query Optimization
SQL Joins and Query OptimizationBrian Gallagher
 
Frequent itemset mining using pattern growth method
Frequent itemset mining using pattern growth methodFrequent itemset mining using pattern growth method
Frequent itemset mining using pattern growth methodShani729
 
Introduction to data structure
Introduction to data structureIntroduction to data structure
Introduction to data structureadeel hamid
 
Data Structure and its Fundamentals
Data Structure and its FundamentalsData Structure and its Fundamentals
Data Structure and its FundamentalsHitesh Mohapatra
 

Mais procurados (20)

Introduction to r
Introduction to rIntroduction to r
Introduction to r
 
Chapter 11 ds
Chapter 11 dsChapter 11 ds
Chapter 11 ds
 
Unit i(dsc++)
Unit i(dsc++)Unit i(dsc++)
Unit i(dsc++)
 
Fp growth
Fp growthFp growth
Fp growth
 
Introduction of Data Structure
Introduction of Data StructureIntroduction of Data Structure
Introduction of Data Structure
 
Data Structure
Data StructureData Structure
Data Structure
 
Data Types | CS8251- Programming in c | Learn Hub
Data Types | CS8251- Programming in c | Learn HubData Types | CS8251- Programming in c | Learn Hub
Data Types | CS8251- Programming in c | Learn Hub
 
introduction to Data Structure and classification
 introduction to Data Structure and classification introduction to Data Structure and classification
introduction to Data Structure and classification
 
Unit iv(dsc++)
Unit iv(dsc++)Unit iv(dsc++)
Unit iv(dsc++)
 
Chapter 10: hashing data structure
Chapter 10:  hashing data structureChapter 10:  hashing data structure
Chapter 10: hashing data structure
 
Algorithms: I
Algorithms: IAlgorithms: I
Algorithms: I
 
Phd coursestatalez2datamanagement
Phd coursestatalez2datamanagementPhd coursestatalez2datamanagement
Phd coursestatalez2datamanagement
 
List moderate
List   moderateList   moderate
List moderate
 
Presentation on data preparation with pandas
Presentation on data preparation with pandasPresentation on data preparation with pandas
Presentation on data preparation with pandas
 
Computer project
Computer projectComputer project
Computer project
 
Presentation on basics of python
Presentation on basics of pythonPresentation on basics of python
Presentation on basics of python
 
SQL Joins and Query Optimization
SQL Joins and Query OptimizationSQL Joins and Query Optimization
SQL Joins and Query Optimization
 
Frequent itemset mining using pattern growth method
Frequent itemset mining using pattern growth methodFrequent itemset mining using pattern growth method
Frequent itemset mining using pattern growth method
 
Introduction to data structure
Introduction to data structureIntroduction to data structure
Introduction to data structure
 
Data Structure and its Fundamentals
Data Structure and its FundamentalsData Structure and its Fundamentals
Data Structure and its Fundamentals
 

Semelhante a Unraveling The Meaning From COVID-19 Dataset Using Python – A Tutorial for beginners

Python Pandas
Python PandasPython Pandas
Python PandasSunil OS
 
Unit 2 - Data Manipulation with R.pptx
Unit 2 - Data Manipulation with R.pptxUnit 2 - Data Manipulation with R.pptx
Unit 2 - Data Manipulation with R.pptxMalla Reddy University
 
Fake News and Their Detection
Fake News and Their DetectionFake News and Their Detection
Fake News and Their DetectionKourosh Sajjadi
 
PPT on Data Science Using Python
PPT on Data Science Using PythonPPT on Data Science Using Python
PPT on Data Science Using PythonNishantKumar1179
 
Lesson 2 data preprocessing
Lesson 2   data preprocessingLesson 2   data preprocessing
Lesson 2 data preprocessingAbdurRazzaqe1
 
Don't Repeat Yourself, and Automated Code Reviews
Don't Repeat Yourself, and Automated Code ReviewsDon't Repeat Yourself, and Automated Code Reviews
Don't Repeat Yourself, and Automated Code ReviewsGramener
 
Introduction to Data Science With R Notes
Introduction to Data Science With R NotesIntroduction to Data Science With R Notes
Introduction to Data Science With R NotesLakshmiSarvani6
 
Using pandas library for data analysis in python
Using pandas library for data analysis in pythonUsing pandas library for data analysis in python
Using pandas library for data analysis in pythonBruce Jenks
 
Unit 4_Working with Graphs _python (2).pptx
Unit 4_Working with Graphs _python (2).pptxUnit 4_Working with Graphs _python (2).pptx
Unit 4_Working with Graphs _python (2).pptxprakashvs7
 
De-Cluttering-ML | TechWeekends
De-Cluttering-ML | TechWeekendsDe-Cluttering-ML | TechWeekends
De-Cluttering-ML | TechWeekendsDSCUSICT
 
A Map of the PyData Stack
A Map of the PyData StackA Map of the PyData Stack
A Map of the PyData StackPeadar Coyle
 
Float Data Type in C.pdf
Float Data Type in C.pdfFloat Data Type in C.pdf
Float Data Type in C.pdfSudhanshiBakre1
 
XII - 2022-23 - IP - RAIPUR (CBSE FINAL EXAM).pdf
XII -  2022-23 - IP - RAIPUR (CBSE FINAL EXAM).pdfXII -  2022-23 - IP - RAIPUR (CBSE FINAL EXAM).pdf
XII - 2022-23 - IP - RAIPUR (CBSE FINAL EXAM).pdfKrishnaJyotish1
 
Python-for-Data-Analysis.pptx
Python-for-Data-Analysis.pptxPython-for-Data-Analysis.pptx
Python-for-Data-Analysis.pptxParveenShaik21
 
Implementing a data_science_project (Python Version)_part1
Implementing a data_science_project (Python Version)_part1Implementing a data_science_project (Python Version)_part1
Implementing a data_science_project (Python Version)_part1Dr Sulaimon Afolabi
 
Comparing EDA with classical and Bayesian analysis.pptx
Comparing EDA with classical and Bayesian analysis.pptxComparing EDA with classical and Bayesian analysis.pptx
Comparing EDA with classical and Bayesian analysis.pptxPremaGanesh1
 
Congrats ! You got your Data Science Job
Congrats ! You got your Data Science JobCongrats ! You got your Data Science Job
Congrats ! You got your Data Science JobRohit Dubey
 

Semelhante a Unraveling The Meaning From COVID-19 Dataset Using Python – A Tutorial for beginners (20)

Python Pandas
Python PandasPython Pandas
Python Pandas
 
Unit 2 - Data Manipulation with R.pptx
Unit 2 - Data Manipulation with R.pptxUnit 2 - Data Manipulation with R.pptx
Unit 2 - Data Manipulation with R.pptx
 
Numerical data.
Numerical data.Numerical data.
Numerical data.
 
Fake News and Their Detection
Fake News and Their DetectionFake News and Their Detection
Fake News and Their Detection
 
PPT on Data Science Using Python
PPT on Data Science Using PythonPPT on Data Science Using Python
PPT on Data Science Using Python
 
Project
ProjectProject
Project
 
Lesson 2 data preprocessing
Lesson 2   data preprocessingLesson 2   data preprocessing
Lesson 2 data preprocessing
 
Don't Repeat Yourself, and Automated Code Reviews
Don't Repeat Yourself, and Automated Code ReviewsDon't Repeat Yourself, and Automated Code Reviews
Don't Repeat Yourself, and Automated Code Reviews
 
Introduction to Data Science With R Notes
Introduction to Data Science With R NotesIntroduction to Data Science With R Notes
Introduction to Data Science With R Notes
 
Using pandas library for data analysis in python
Using pandas library for data analysis in pythonUsing pandas library for data analysis in python
Using pandas library for data analysis in python
 
Unit 4_Working with Graphs _python (2).pptx
Unit 4_Working with Graphs _python (2).pptxUnit 4_Working with Graphs _python (2).pptx
Unit 4_Working with Graphs _python (2).pptx
 
De-Cluttering-ML | TechWeekends
De-Cluttering-ML | TechWeekendsDe-Cluttering-ML | TechWeekends
De-Cluttering-ML | TechWeekends
 
A Map of the PyData Stack
A Map of the PyData StackA Map of the PyData Stack
A Map of the PyData Stack
 
Float Data Type in C.pdf
Float Data Type in C.pdfFloat Data Type in C.pdf
Float Data Type in C.pdf
 
XII - 2022-23 - IP - RAIPUR (CBSE FINAL EXAM).pdf
XII -  2022-23 - IP - RAIPUR (CBSE FINAL EXAM).pdfXII -  2022-23 - IP - RAIPUR (CBSE FINAL EXAM).pdf
XII - 2022-23 - IP - RAIPUR (CBSE FINAL EXAM).pdf
 
Python-for-Data-Analysis.pptx
Python-for-Data-Analysis.pptxPython-for-Data-Analysis.pptx
Python-for-Data-Analysis.pptx
 
Implementing a data_science_project (Python Version)_part1
Implementing a data_science_project (Python Version)_part1Implementing a data_science_project (Python Version)_part1
Implementing a data_science_project (Python Version)_part1
 
Comparing EDA with classical and Bayesian analysis.pptx
Comparing EDA with classical and Bayesian analysis.pptxComparing EDA with classical and Bayesian analysis.pptx
Comparing EDA with classical and Bayesian analysis.pptx
 
Congrats ! You got your Data Science Job
Congrats ! You got your Data Science JobCongrats ! You got your Data Science Job
Congrats ! You got your Data Science Job
 
More on Pandas.pptx
More on Pandas.pptxMore on Pandas.pptx
More on Pandas.pptx
 

Mais de Kavika Roy

Top 5 Travel Analytics Solutions Companies.pptx
Top 5 Travel Analytics Solutions Companies.pptxTop 5 Travel Analytics Solutions Companies.pptx
Top 5 Travel Analytics Solutions Companies.pptxKavika Roy
 
Transforming Hotel Data Analytics with a Resilient Datawarehouse.pptx
Transforming Hotel Data Analytics with a Resilient Datawarehouse.pptxTransforming Hotel Data Analytics with a Resilient Datawarehouse.pptx
Transforming Hotel Data Analytics with a Resilient Datawarehouse.pptxKavika Roy
 
6 Top Real Estate Managed Analytics Service Providers.pptx
6 Top Real Estate Managed Analytics Service Providers.pptx6 Top Real Estate Managed Analytics Service Providers.pptx
6 Top Real Estate Managed Analytics Service Providers.pptxKavika Roy
 
Top Manufacturing Analytics solutions providers for US Startups.pptx
Top Manufacturing Analytics solutions providers for US Startups.pptxTop Manufacturing Analytics solutions providers for US Startups.pptx
Top Manufacturing Analytics solutions providers for US Startups.pptxKavika Roy
 
Top 10 Analytics & BI Consultants in Manufacturing.pptx
Top 10 Analytics & BI Consultants in Manufacturing.pptxTop 10 Analytics & BI Consultants in Manufacturing.pptx
Top 10 Analytics & BI Consultants in Manufacturing.pptxKavika Roy
 
Top 5 data warehousing consulting companies for US travel and tourism.pptx
Top 5 data warehousing consulting companies for US travel and tourism.pptxTop 5 data warehousing consulting companies for US travel and tourism.pptx
Top 5 data warehousing consulting companies for US travel and tourism.pptxKavika Roy
 
6 Top UK Real Estate Analytics Firms.pptx
6 Top UK Real Estate Analytics Firms.pptx6 Top UK Real Estate Analytics Firms.pptx
6 Top UK Real Estate Analytics Firms.pptxKavika Roy
 
eCommerce Managed Analytics companies.pptx
eCommerce Managed Analytics companies.pptxeCommerce Managed Analytics companies.pptx
eCommerce Managed Analytics companies.pptxKavika Roy
 
10 Common myths in affiliate marketing.pptx
10 Common myths in affiliate marketing.pptx10 Common myths in affiliate marketing.pptx
10 Common myths in affiliate marketing.pptxKavika Roy
 
Real world Examples of AI Products in action
Real world Examples of AI Products in actionReal world Examples of AI Products in action
Real world Examples of AI Products in actionKavika Roy
 
Mastering Affiliate Marketing- A Strategic Journey (1).pptx
Mastering Affiliate Marketing- A Strategic Journey (1).pptxMastering Affiliate Marketing- A Strategic Journey (1).pptx
Mastering Affiliate Marketing- A Strategic Journey (1).pptxKavika Roy
 
Building AI product from Scratch for C-level Executives
Building AI product from Scratch for C-level ExecutivesBuilding AI product from Scratch for C-level Executives
Building AI product from Scratch for C-level ExecutivesKavika Roy
 
"2024 Side Hustles: Diversify Income, Monetize Passion!"
"2024 Side Hustles: Diversify Income, Monetize Passion!""2024 Side Hustles: Diversify Income, Monetize Passion!"
"2024 Side Hustles: Diversify Income, Monetize Passion!"Kavika Roy
 
What are the Six Big Losses in OEE? - By DataToBiz
What are the Six Big Losses in OEE? - By DataToBizWhat are the Six Big Losses in OEE? - By DataToBiz
What are the Six Big Losses in OEE? - By DataToBizKavika Roy
 
Types of Data Engineering Services - By DataToBiz
Types of Data Engineering Services - By DataToBizTypes of Data Engineering Services - By DataToBiz
Types of Data Engineering Services - By DataToBizKavika Roy
 
Top Business Intelligence Trends - By DataToBiz
Top Business Intelligence Trends - By DataToBizTop Business Intelligence Trends - By DataToBiz
Top Business Intelligence Trends - By DataToBizKavika Roy
 
How to use PrepAI to Generate HOTS Questions? - By PrepAI
How to use PrepAI to Generate HOTS Questions? - By PrepAIHow to use PrepAI to Generate HOTS Questions? - By PrepAI
How to use PrepAI to Generate HOTS Questions? - By PrepAIKavika Roy
 
5 Ways to Develop Metacognitive Skills - By PrepAI
5 Ways to Develop Metacognitive Skills - By PrepAI5 Ways to Develop Metacognitive Skills - By PrepAI
5 Ways to Develop Metacognitive Skills - By PrepAIKavika Roy
 
Methods to Upskill and Reskill Your Employees.pdf
Methods to Upskill and Reskill Your Employees.pdfMethods to Upskill and Reskill Your Employees.pdf
Methods to Upskill and Reskill Your Employees.pdfKavika Roy
 
Common eLearning Challenges and Solutions- By PrepAI
Common eLearning Challenges and Solutions- By PrepAICommon eLearning Challenges and Solutions- By PrepAI
Common eLearning Challenges and Solutions- By PrepAIKavika Roy
 

Mais de Kavika Roy (20)

Top 5 Travel Analytics Solutions Companies.pptx
Top 5 Travel Analytics Solutions Companies.pptxTop 5 Travel Analytics Solutions Companies.pptx
Top 5 Travel Analytics Solutions Companies.pptx
 
Transforming Hotel Data Analytics with a Resilient Datawarehouse.pptx
Transforming Hotel Data Analytics with a Resilient Datawarehouse.pptxTransforming Hotel Data Analytics with a Resilient Datawarehouse.pptx
Transforming Hotel Data Analytics with a Resilient Datawarehouse.pptx
 
6 Top Real Estate Managed Analytics Service Providers.pptx
6 Top Real Estate Managed Analytics Service Providers.pptx6 Top Real Estate Managed Analytics Service Providers.pptx
6 Top Real Estate Managed Analytics Service Providers.pptx
 
Top Manufacturing Analytics solutions providers for US Startups.pptx
Top Manufacturing Analytics solutions providers for US Startups.pptxTop Manufacturing Analytics solutions providers for US Startups.pptx
Top Manufacturing Analytics solutions providers for US Startups.pptx
 
Top 10 Analytics & BI Consultants in Manufacturing.pptx
Top 10 Analytics & BI Consultants in Manufacturing.pptxTop 10 Analytics & BI Consultants in Manufacturing.pptx
Top 10 Analytics & BI Consultants in Manufacturing.pptx
 
Top 5 data warehousing consulting companies for US travel and tourism.pptx
Top 5 data warehousing consulting companies for US travel and tourism.pptxTop 5 data warehousing consulting companies for US travel and tourism.pptx
Top 5 data warehousing consulting companies for US travel and tourism.pptx
 
6 Top UK Real Estate Analytics Firms.pptx
6 Top UK Real Estate Analytics Firms.pptx6 Top UK Real Estate Analytics Firms.pptx
6 Top UK Real Estate Analytics Firms.pptx
 
eCommerce Managed Analytics companies.pptx
eCommerce Managed Analytics companies.pptxeCommerce Managed Analytics companies.pptx
eCommerce Managed Analytics companies.pptx
 
10 Common myths in affiliate marketing.pptx
10 Common myths in affiliate marketing.pptx10 Common myths in affiliate marketing.pptx
10 Common myths in affiliate marketing.pptx
 
Real world Examples of AI Products in action
Real world Examples of AI Products in actionReal world Examples of AI Products in action
Real world Examples of AI Products in action
 
Mastering Affiliate Marketing- A Strategic Journey (1).pptx
Mastering Affiliate Marketing- A Strategic Journey (1).pptxMastering Affiliate Marketing- A Strategic Journey (1).pptx
Mastering Affiliate Marketing- A Strategic Journey (1).pptx
 
Building AI product from Scratch for C-level Executives
Building AI product from Scratch for C-level ExecutivesBuilding AI product from Scratch for C-level Executives
Building AI product from Scratch for C-level Executives
 
"2024 Side Hustles: Diversify Income, Monetize Passion!"
"2024 Side Hustles: Diversify Income, Monetize Passion!""2024 Side Hustles: Diversify Income, Monetize Passion!"
"2024 Side Hustles: Diversify Income, Monetize Passion!"
 
What are the Six Big Losses in OEE? - By DataToBiz
What are the Six Big Losses in OEE? - By DataToBizWhat are the Six Big Losses in OEE? - By DataToBiz
What are the Six Big Losses in OEE? - By DataToBiz
 
Types of Data Engineering Services - By DataToBiz
Types of Data Engineering Services - By DataToBizTypes of Data Engineering Services - By DataToBiz
Types of Data Engineering Services - By DataToBiz
 
Top Business Intelligence Trends - By DataToBiz
Top Business Intelligence Trends - By DataToBizTop Business Intelligence Trends - By DataToBiz
Top Business Intelligence Trends - By DataToBiz
 
How to use PrepAI to Generate HOTS Questions? - By PrepAI
How to use PrepAI to Generate HOTS Questions? - By PrepAIHow to use PrepAI to Generate HOTS Questions? - By PrepAI
How to use PrepAI to Generate HOTS Questions? - By PrepAI
 
5 Ways to Develop Metacognitive Skills - By PrepAI
5 Ways to Develop Metacognitive Skills - By PrepAI5 Ways to Develop Metacognitive Skills - By PrepAI
5 Ways to Develop Metacognitive Skills - By PrepAI
 
Methods to Upskill and Reskill Your Employees.pdf
Methods to Upskill and Reskill Your Employees.pdfMethods to Upskill and Reskill Your Employees.pdf
Methods to Upskill and Reskill Your Employees.pdf
 
Common eLearning Challenges and Solutions- By PrepAI
Common eLearning Challenges and Solutions- By PrepAICommon eLearning Challenges and Solutions- By PrepAI
Common eLearning Challenges and Solutions- By PrepAI
 

Último

Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Principled Technologies
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024The Digital Insurer
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesBoston Institute of Analytics
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 

Último (20)

Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 

Unraveling The Meaning From COVID-19 Dataset Using Python – A Tutorial for beginners

  • 1. Unraveling The Meaning From COVID-19 Dataset Using Python A Tutorial for beginners
  • 2. Introduction Pandas: Open Source Python Library that allows us to practice various tools for data analysis. Majorly used for Data Analysis and Manipulation. Seaborn: Another Python Library for Data Visualization, based on Matplotlib. Provides a wide range of Graphics for presentation purpose. Matplotlib: Python Library for multi-platform Data Visualization. Widely used for creating, manipulating and plotting interactive visualizations. The Corona Virus – COVID-19 outbreak has brought the whole world to a stand still position, with complete lock-down in several countries. Salute! To every health and security professional. Today, we will attempt to perform a single data analysis with COVID-19 Dataset Using Python. Here’s the link for Data Set available on Kaggle. Following are the the Python Libraries we’ll be implementing today for this exercise.
  • 3. What Data Does It Hold Sno: Serial Number. ObservationDate: Date of Observation in mm/dd/yyyy format. Province/State: Province or State of the case. Country/Region: Country or region of the case. Last Update: UTC time format for when was the row updated. Confirmed: Cumulative number of confirmed cases Deaths: Cumulative number of deaths cases Recovered: Cumulative number of recovered cases The available dataset has details of number of cases for COVID-19, on daily basis. Let us begin with understanding the columns and what they represent. Column Description for the Dataset: These are the columns within the file, most of our work will working around three columns which are Confirmed, Deaths and Recovered.
  • 4. Let Us Begin: Firstly, we’ll import our first library, pandas and read the source file. import pandas as pd df = pd.read_csv("covid_19_data.csv") Now that we have read the data, let us print the head of the file, which will print top five rows with columns. df.head()
  • 5. As you can see in the above screenshot, we have printed the top five rows of the data file, with the columns explained earlier. Let us now get into some dept of the data, where we can understand the mean and standard deviation of the data, along with other factors. df.describe()
  • 6. Describe function in pandas is used to return the basic details of the data, statistically. We have our mean, which is “1972.956586” for confirmed cases and Standard Deviation is “10807.777684” for confirmed cases. Mean and Standard Deviation for Deaths and Recovered columns is listed, too. Let us now begin with plotting the data, which means to plot these data points on graph or histogram. We used pandas library until now, we’ll need to import the other two libraries and proceed. import seaborn as sns import matplotlib.pyplot as plt We now have imported all three libraries. We will now attempt to plot our data on a graph and output will reflect figure with three data points on a graph and their movements towards the latest date. plt.figure(figsize = (12,8)) df.groupby('ObservationDate').mean()['Confirmed'].plot() df.groupby('ObservationDate').mean()['Recovered'].plot() df.groupby('ObservationDate').mean()['Deaths'].plot()
  • 7. Code Explanation: plt.figure with initial the plot with mentioned width and height. figsize is used to define the size of the figure, it takes two float numbers as parameters, which are width and height in inches. If parameters not provided, default will be scParams, [6.4, 4.8]. Then we have grouped Observation Data column with three different columns, which are Confirmed, Recovered and Deaths. Observation goes horizontal along with the vertical count. Above code will plot the three columns one by one and the output after execution will be as shown in following image. READ THE FULL ARTICLE: https://www.datatobiz.com/blog/unraveling-the-u-meaning-from-covid- 19-dataset-using-python-a-tutorial-for-beginners/
  • 8.
  • 9. This data reflects the impact of COVID-19 over the globe, distributed in three columns. Using the same data, we can implement prediction models but the data is quite uncertain and does not qualify for prediction purpose. Moving on we will focus on India as Country and analyze the data Country Focus: India Let us specifically check the data for India. ind = df[df['Country/Region'] == 'India'] ind.head() Above lines of code will filter out columns with India as Country/Region and place those columns in “ind” and upon checking for the head(), it will reflect the top five columns. Check the below attached screenshot.
  • 10. Let’s plot the data for India: plt.figure(figsize = (12,8)) ind.groupby('ObservationDate').mean()['Confirmed'].plot() ind.groupby('ObservationDate').mean()['Recovered'].plot() ind.groupby('ObservationDate').mean()['Deaths'].plot()
  • 11. Similar to earlier example, this code will return a figure with the columns plotted on the figure. Output for above code will be:
  • 12. This is how Data is represented graphically, making it easy to read and understand. Moving forward, we will implement a Satterplot using Seaborn library. Our next figure will place data points, with respect to sex of the patient. Code: Firstly we’ll make some minor changes in variables. df['sex'] = df['sex'].replace(to_replace = 'male', value = 'Male') df['sex'] = df['sex'].replace(to_replace = 'female', value = 'Female') Above code simply changes the variable names to standard format. Then we’ll fill the data points into the figure, plotting. plt.figure(figsize = (15,8)) sns.scatterplot(x = 'longitude', y = 'latitude', data = df2, hue = 'sex', alpha = 0.2)
  • 13. Code Explanation: The “x and y” defines the longitude and latitude. data defines the data frame or the source, where columns and rows are variables and observations, respectively. The hue defines the variable names in the data and here these variables will be produced with different colors. alpha, which takes float value decides the opacity for the points. Refer the below attached screenshot for proper output.
  • 14.
  • 15. Future Scope: Now that we have understood how to read raw data and present it in readable figures, here the future scope could be implementing a Time Series Forecasting Module and getting a Prediction. Using RNN, we could achieve a possibly realistic number of future cases for COVID-19. But at present, it could be difficult to get realistic prediction as the data we posses now is too uncertain and too less. But considering the current situation and the fight we have been giving, we have decided not to implement Prediction Module to acquire any number which could lead to unnecessary unrest.
  • 16. Read the full article https://www.datatobiz.com/blog/unraveling-the-u-meaning-from- covid-19-dataset-using-python-a-tutorial-for-beginners/