SlideShare a Scribd company logo
DATA VISUALIZATION USING DIFFERENT
PYTHON LIBRARIES (E.G., PANDAS,
NUMPY, MATPLOTLIB)
TEHMIMA ISMAIL
0000412064
MSCS-II
WHAT IS DATA VISUALIZATION?
• Introduction to Data Visualization
• Definition: "Field in data analysis, visually represents data."
• Purpose: "Effectively communicates inferences through graphics."
• Benefit: "Provides a quick visual summary of data."
• Tools: "Utilizes pictures, maps, and graphs."
• Advantage: "Easier processing and understanding for the human mind."
• Application: "Applicable to both small and large data sets."
• Challenge: "Impossible manual processing for large data sets."
DATA VISUALIZATION IN PYTHON
• Python offers several plotting libraries, namely Matplotlib, Seaborn and
many other such data visualization packages with different features for
creating informative, customized, and appealing plots to present data in the
most simple and effective way.
MATPLOTLIB AND SEABORN
• Matplotlib and Seaborn are python libraries that are used for data
visualization.
• They have inbuilt modules for plotting different graphs.
• Matplotlib is used to embed graphs into applications.
• Seaborn is primarily used for statistical graphs.
LINE CHARTS
• A Line chart is a graph that represents information as a series of data points connected by a
straight line.
• In line charts, each data point or marker is plotted and connected with a line or curve.
Let's consider the apple yield (tons per hectare) in Kanto. Let's plot a line graph using this data
and see how the yield of apples changes over time. We start by importing Matplotlib and
Seaborn.
USING MATPLOTLIB
We are using random data points to represent the yield of apples.
To better understand the graph and its purpose, we can add the x-axis values
too.
• Let's add labels to the axes so that we can show what each axis represents.
.
• To plot multiple datasets on the same graph, just use the plt.plot function
once for each dataset. Let's use this to compare the yields of apples vs.
oranges on the same graph.
We can add a legend which tells us what each line in our graph means. To
understand what we are plotting, we can add a title to our graph.
To show each data point on our graph, we can highlight them with markers
using the marker argument. Many different marker shapes like a circle, cross,
square, diamond, etc. are provided by Matplotlib.
You can use the plt.figure function to change the size of the figure.
USING SEABORN
• An easy way to make your charts look beautiful is to use some default styles from the
Seaborn library. These can be applied globally using the sns.set_style function.
• We can also use the darkgrid option to change the background color to a
darker shade
BAR GRAPHS
• Categorical Data Representation:
• Utilize bar graphs for effective representation.
• Y-axis: Represents values; X-axis: Represents categories.
• Axis Interpretation:
• Y-axis reflects numerical data values.
• X-axis denotes categorical data labels.
• Data-Category Relationship:
• Bars visually linked to specific categories.
• Offers clear representation of data distribution.
• Effective Communication:
• Facilitates easy communication of categorical data.
• Provides quick understanding.
• Flexibility for Categorical Data:
• Applicable to various types of categorical data.
• Enables easy comparison between different categories.
PLOTTING BAR GRAPHS
WE CAN ALSO STACK BARS ON TOP OF EACH OTHER. LET'S
PLOT THE DATA FOR APPLES AND ORANGES
PLOTTING AVERAGES OF EACH BAR
• We can draw a bar chart to visualize how the average bill amount varies across different days of the
week. We can do this by computing the day-wise averages and then using plt.bar. The Seaborn library
also provides a barplot function that can automatically compute averages.
PLOTTING MULTIPLE BAR GRAPHS
• If you want to compare bar plots side-by-side, you can use the hue argument. The comparison will be
done based on the third feature specified in this argument.
PLOTTING HORIZONTAL BAR GRAPHS
• You can make the bars horizontal by switching the axes.
HISTOGRAMS
Histogram Overview:
• Utilizes bars to represent data variation across a range.
• Y-axis indicates data frequency, while the X-axis shows value ranges.
• Bars represent data quantities within specific value ranges.
IRIS DATASET
• Let's again use the ‘Iris’ data which contains information about flowers to plot histograms.
PLOTTING HISTOGRAMS
• Now, let’s plot a histogram using the hist() function.
CHANGING NUMBER OF BINS
• We can control the number or size of bins too
CHANGING NUMBER AND SIZE OF BINS
• We can change the number and size of bins using numpy too.
BINS OF UNEQUAL SIZE
• We can create bins of unequal size too.
MULTIPLE HISTOGRAMS
• Similar to line charts, we can draw multiple histograms in a single chart. We can reduce each
histogram's opacity so that one histogram's bars don't hide the others'. Let's draw separate histograms
for each species of flowers.
STACKING HISTOGRAMS
• Multiple histograms can be stacked on top of one another by setting the stacked parameter to True.
📊STOCK MARKET ANALYSIS 📈 + PREDICTION USING
LSTM
• Tesla Stock Price, S&P 500 stock data, AMZN, DPZ, BTC, NTFX adjusted
May 2013-May2019 +1
Data Project - Stock Market Analysis
TIME SERIES DATA
• Time Series data is a series of data points indexed in time order.
• We will discover and explore data from the stock market, particularly some
technology stocks (Apple, Amazon, Google, and Microsoft). We will learn
how to use yfinance to get stock information, and visualize different aspects
of it using Seaborn and Matplotlib. We will also be predicting future stock
prices through a Long Short Term Memory (LSTM) method!
WE'LL BE ANSWERING THE FOLLOWING QUESTIONS
ALONG THE WAY
1.) What was the change in price of the stock over time
2.) What was the daily return of the stock on average
3.) What was the moving average of the various stocks
4.) What was the correlation between different stocks
5.) How much value do we put at risk by investing in a particular stock 6.) How
can we attempt to predict future stock behavior (Predicting the closing price
stock price of APPLE inc using LSTM)
GETTING THE DATA
• The first step is to get the data and load it to memory.
• We will get our stock data from the Yahoo Finance website.
• Yahoo Finance is a rich resource of financial market data and tools to find
compelling investments.
• To get the data from Yahoo Finance, we will be using yfinance library which
offers a threaded and Pythonic way to download market data from Yahoo.
WHAT WAS THE CHANGE IN PRICE OF THE STOCK
OVERTIME?
• In this section we'll go over how to handle requesting stock information with
pandas, and how to analyze basic attributes of a stock.
WHAT WAS THE CHANGE IN PRICE OF THE STOCK
OVERTIME?
https://www.kaggle.com/code/faressayah/stock-market-analysis-
prediction-using-lstm?scriptVersionId=117825740&cellId=5
OUTPUT
DESCRIPTIVE STATISTICS ABOUT THE DATA
• .describe() generates descriptive statistics. Descriptive statistics include those that
summarize the central tendency, dispersion, and shape of a dataset’s distribution,
excluding NaN values.
• Analyzes both numeric and object series, as well as DataFrame column sets of mixed data
types. The output will vary depending on what is provided. Refer to the notes below for more
detail.
DESCRIPTIVE STATISTICS ABOUT THE DATA
We have only 255 records in one year because weekends are not included in the data
INFORMATION ABOUT THE DATA
• .info() method prints information about a DataFrame including the
index dtype and columns, non-null values, and memory usage.
CLOSING PRICE
• The closing price is the last price at which the stock is traded during the regular trading day.
A stock’s closing price is the standard benchmark used by investors to track its performance
over time.
CLOSING PRICE
VOLUME OF SALES
• Volume is the amount of an asset or security that changes hands over some period of time, often over
the course of a day. For instance, the stock trading volume would refer to the number of shares of
security traded between its daily open and close. Trading volume, and changes to volume over the
course of time, are important inputs for technical traders.
VOLUME OF SALES
WHAT WAS THE MOVING AVERAGE OF THE VARIOUS STOCKS?
WHAT WAS THE DAILY RETURN OF THE STOCK ON AVERAGE?
WHAT WAS THE MOVING AVERAGE OF THE VARIOUS STOCKS?
WHAT WAS THE DAILY RETURN OF THE STOCK ON AVERAGE?
WHAT WAS THE CORRELATION BETWEEN DIFFERENT STOCKS CLOSING PRICES?
OUTPUT
HOW MUCH VALUE DO WE PUT AT RISK BY
INVESTING IN A PARTICULAR STOCK?
HOW MUCH VALUE DO WE PUT AT RISK BY
INVESTING IN A PARTICULAR STOCK?
PREDICTING THE CLOSING PRICE STOCK PRICE OF
APPLE INC:
PREDICTING THE CLOSING PRICE STOCK PRICE OF
APPLE INC:
THANK YOU

More Related Content

What's hot

Data Visualization with Tableau - by Knowledgebee Trainings
Data Visualization with Tableau - by Knowledgebee TrainingsData Visualization with Tableau - by Knowledgebee Trainings
Data Visualization with Tableau - by Knowledgebee Trainings
Ramesh Pabba - seeking new projects
 
Power of data visualization
Power of data visualizationPower of data visualization
Power of data visualization
SayantiniBiswas
 
Data Visualization Tools
Data Visualization ToolsData Visualization Tools
Data Visualization & Analytics.pptx
Data Visualization & Analytics.pptxData Visualization & Analytics.pptx
Data Visualization & Analytics.pptx
hiralpatel3085
 
Data visualization
Data visualizationData visualization
Data visualization
Subarna Natarajan
 
Data Visualization & Data Storytelling
Data Visualization & Data StorytellingData Visualization & Data Storytelling
Data Visualization & Data Storytelling
彭其捷 Jack
 
Data Visualization - A Brief Overview
Data Visualization - A Brief OverviewData Visualization - A Brief Overview
Data Visualization - A Brief Overview
Rotary Club of North Raleigh
 
Data visualization
Data visualizationData visualization
Data visualization
Jan Willem Tulp
 
Tableau
TableauTableau
Tableau
Nilesh Patel
 
the history of data visualization
the history of data visualizationthe history of data visualization
the history of data visualization
NIFTIT
 
Data visualization tools & techniques - 1
Data visualization tools & techniques - 1Data visualization tools & techniques - 1
Data visualization tools & techniques - 1
Korivi Sravan Kumar
 
Data Visualization Tools in Python
Data Visualization Tools in PythonData Visualization Tools in Python
Data Visualization Tools in Python
Roman Merkulov
 
Data Visualization Design Best Practices Workshop
Data Visualization Design Best Practices WorkshopData Visualization Design Best Practices Workshop
Data Visualization Design Best Practices Workshop
JSI
 
Data Visualization
Data VisualizationData Visualization
Data Visualization
Marco Torchiano
 
Data Visualization.pptx
Data Visualization.pptxData Visualization.pptx
Data Visualization.pptx
Ultimate Multimedia Consult
 
The Importance of Data Visualization
The Importance of Data VisualizationThe Importance of Data Visualization
The Importance of Data Visualization
Centerline Digital
 
Tableau 7.0 prsentation
Tableau 7.0 prsentationTableau 7.0 prsentation
Tableau 7.0 prsentationinam_slides
 
DAX and Power BI Training - 002 DAX Level 1 - 3
DAX and Power BI Training - 002 DAX Level 1 - 3DAX and Power BI Training - 002 DAX Level 1 - 3
DAX and Power BI Training - 002 DAX Level 1 - 3
Will Harvey
 
Tableau ppt
Tableau pptTableau ppt
Data Visualization in Data Science
Data Visualization in Data ScienceData Visualization in Data Science
Data Visualization in Data Science
Maloy Manna, PMP®
 

What's hot (20)

Data Visualization with Tableau - by Knowledgebee Trainings
Data Visualization with Tableau - by Knowledgebee TrainingsData Visualization with Tableau - by Knowledgebee Trainings
Data Visualization with Tableau - by Knowledgebee Trainings
 
Power of data visualization
Power of data visualizationPower of data visualization
Power of data visualization
 
Data Visualization Tools
Data Visualization ToolsData Visualization Tools
Data Visualization Tools
 
Data Visualization & Analytics.pptx
Data Visualization & Analytics.pptxData Visualization & Analytics.pptx
Data Visualization & Analytics.pptx
 
Data visualization
Data visualizationData visualization
Data visualization
 
Data Visualization & Data Storytelling
Data Visualization & Data StorytellingData Visualization & Data Storytelling
Data Visualization & Data Storytelling
 
Data Visualization - A Brief Overview
Data Visualization - A Brief OverviewData Visualization - A Brief Overview
Data Visualization - A Brief Overview
 
Data visualization
Data visualizationData visualization
Data visualization
 
Tableau
TableauTableau
Tableau
 
the history of data visualization
the history of data visualizationthe history of data visualization
the history of data visualization
 
Data visualization tools & techniques - 1
Data visualization tools & techniques - 1Data visualization tools & techniques - 1
Data visualization tools & techniques - 1
 
Data Visualization Tools in Python
Data Visualization Tools in PythonData Visualization Tools in Python
Data Visualization Tools in Python
 
Data Visualization Design Best Practices Workshop
Data Visualization Design Best Practices WorkshopData Visualization Design Best Practices Workshop
Data Visualization Design Best Practices Workshop
 
Data Visualization
Data VisualizationData Visualization
Data Visualization
 
Data Visualization.pptx
Data Visualization.pptxData Visualization.pptx
Data Visualization.pptx
 
The Importance of Data Visualization
The Importance of Data VisualizationThe Importance of Data Visualization
The Importance of Data Visualization
 
Tableau 7.0 prsentation
Tableau 7.0 prsentationTableau 7.0 prsentation
Tableau 7.0 prsentation
 
DAX and Power BI Training - 002 DAX Level 1 - 3
DAX and Power BI Training - 002 DAX Level 1 - 3DAX and Power BI Training - 002 DAX Level 1 - 3
DAX and Power BI Training - 002 DAX Level 1 - 3
 
Tableau ppt
Tableau pptTableau ppt
Tableau ppt
 
Data Visualization in Data Science
Data Visualization in Data ScienceData Visualization in Data Science
Data Visualization in Data Science
 

Similar to Data Visualization using different python libraries.pptx

19CS3052R-CO1-7-S7 ECE
19CS3052R-CO1-7-S7 ECE19CS3052R-CO1-7-S7 ECE
19CS3052R-CO1-7-S7 ECE
Bharath123Maddipati
 
data science with python_UNIT 2_full notes.pdf
data science with python_UNIT 2_full notes.pdfdata science with python_UNIT 2_full notes.pdf
data science with python_UNIT 2_full notes.pdf
mukeshgarg02
 
Seaborn.pptx
Seaborn.pptxSeaborn.pptx
Seaborn.pptx
TheMusicFever
 
datavisualization-5thUnit.pdf
datavisualization-5thUnit.pdfdatavisualization-5thUnit.pdf
datavisualization-5thUnit.pdf
BrijeshPatil13
 
Introduction to matplotlib
Introduction to matplotlibIntroduction to matplotlib
Introduction to matplotlib
Piyush rai
 
Aftros
Aftros Aftros
Aftros
Sezzar
 
Business analysis
Business analysisBusiness analysis
Business analysis
Dhilsath Fathima
 
Data visualization
Data visualizationData visualization
Data visualization
Moushmi Dasgupta
 
Complete unit ii notes
Complete unit ii notesComplete unit ii notes
Complete unit ii notes
Benazir Fathima
 
Multi dimensional model vs (1)
Multi dimensional model vs (1)Multi dimensional model vs (1)
Multi dimensional model vs (1)
JamesDempsey1
 
UNIT_4_data visualization.pptx
UNIT_4_data visualization.pptxUNIT_4_data visualization.pptx
UNIT_4_data visualization.pptx
BhagyasriPatel2
 
Essbase beginner's guide olap fundamental chapter 1
Essbase beginner's guide olap fundamental chapter 1Essbase beginner's guide olap fundamental chapter 1
Essbase beginner's guide olap fundamental chapter 1Amit Sharma
 
Lab3.pptx
Lab3.pptxLab3.pptx
Lab3.pptx
Dhananjay327608
 
Data visualization representation of Analytics data
Data visualization representation of Analytics  dataData visualization representation of Analytics  data
Data visualization representation of Analytics data
Prasad Narasimhan
 
Visual Analytics in Big Data
Visual Analytics in Big DataVisual Analytics in Big Data
Visual Analytics in Big Data
Saurabh Shanbhag
 
Introduction of data science
Introduction of data scienceIntroduction of data science
Introduction of data science
TanujaSomvanshi1
 
MySql
MySqlMySql
IBM Cognos tutorial - ABC LEARN
IBM Cognos tutorial - ABC LEARNIBM Cognos tutorial - ABC LEARN
IBM Cognos tutorial - ABC LEARN
abclearnn
 
OLAP OnLine Analytical Processing
OLAP OnLine Analytical ProcessingOLAP OnLine Analytical Processing
OLAP OnLine Analytical Processing
Walid Elbadawy
 
M. FLORENCE DAYANA/DATABASE MANAGEMENT SYSYTEM
M. FLORENCE DAYANA/DATABASE MANAGEMENT SYSYTEMM. FLORENCE DAYANA/DATABASE MANAGEMENT SYSYTEM
M. FLORENCE DAYANA/DATABASE MANAGEMENT SYSYTEM
Dr.Florence Dayana
 

Similar to Data Visualization using different python libraries.pptx (20)

19CS3052R-CO1-7-S7 ECE
19CS3052R-CO1-7-S7 ECE19CS3052R-CO1-7-S7 ECE
19CS3052R-CO1-7-S7 ECE
 
data science with python_UNIT 2_full notes.pdf
data science with python_UNIT 2_full notes.pdfdata science with python_UNIT 2_full notes.pdf
data science with python_UNIT 2_full notes.pdf
 
Seaborn.pptx
Seaborn.pptxSeaborn.pptx
Seaborn.pptx
 
datavisualization-5thUnit.pdf
datavisualization-5thUnit.pdfdatavisualization-5thUnit.pdf
datavisualization-5thUnit.pdf
 
Introduction to matplotlib
Introduction to matplotlibIntroduction to matplotlib
Introduction to matplotlib
 
Aftros
Aftros Aftros
Aftros
 
Business analysis
Business analysisBusiness analysis
Business analysis
 
Data visualization
Data visualizationData visualization
Data visualization
 
Complete unit ii notes
Complete unit ii notesComplete unit ii notes
Complete unit ii notes
 
Multi dimensional model vs (1)
Multi dimensional model vs (1)Multi dimensional model vs (1)
Multi dimensional model vs (1)
 
UNIT_4_data visualization.pptx
UNIT_4_data visualization.pptxUNIT_4_data visualization.pptx
UNIT_4_data visualization.pptx
 
Essbase beginner's guide olap fundamental chapter 1
Essbase beginner's guide olap fundamental chapter 1Essbase beginner's guide olap fundamental chapter 1
Essbase beginner's guide olap fundamental chapter 1
 
Lab3.pptx
Lab3.pptxLab3.pptx
Lab3.pptx
 
Data visualization representation of Analytics data
Data visualization representation of Analytics  dataData visualization representation of Analytics  data
Data visualization representation of Analytics data
 
Visual Analytics in Big Data
Visual Analytics in Big DataVisual Analytics in Big Data
Visual Analytics in Big Data
 
Introduction of data science
Introduction of data scienceIntroduction of data science
Introduction of data science
 
MySql
MySqlMySql
MySql
 
IBM Cognos tutorial - ABC LEARN
IBM Cognos tutorial - ABC LEARNIBM Cognos tutorial - ABC LEARN
IBM Cognos tutorial - ABC LEARN
 
OLAP OnLine Analytical Processing
OLAP OnLine Analytical ProcessingOLAP OnLine Analytical Processing
OLAP OnLine Analytical Processing
 
M. FLORENCE DAYANA/DATABASE MANAGEMENT SYSYTEM
M. FLORENCE DAYANA/DATABASE MANAGEMENT SYSYTEMM. FLORENCE DAYANA/DATABASE MANAGEMENT SYSYTEM
M. FLORENCE DAYANA/DATABASE MANAGEMENT SYSYTEM
 

Recently uploaded

How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
Jisc
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
vaibhavrinwa19
 
Francesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptxFrancesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptx
EduSkills OECD
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
DhatriParmar
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
Levi Shapiro
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
Special education needs
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
Celine George
 
Group Presentation 2 Economics.Ariana Buscigliopptx
Group Presentation 2 Economics.Ariana BuscigliopptxGroup Presentation 2 Economics.Ariana Buscigliopptx
Group Presentation 2 Economics.Ariana Buscigliopptx
ArianaBusciglio
 
Best Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDABest Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDA
deeptiverma2406
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
Pavel ( NSTU)
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
SACHIN R KONDAGURI
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
TechSoup
 
Honest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptxHonest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptx
timhan337
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
Celine George
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
Peter Windle
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
Atul Kumar Singh
 
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBCSTRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
kimdan468
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
Jisc
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
siemaillard
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
Thiyagu K
 

Recently uploaded (20)

How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
 
Francesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptxFrancesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptx
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
 
Group Presentation 2 Economics.Ariana Buscigliopptx
Group Presentation 2 Economics.Ariana BuscigliopptxGroup Presentation 2 Economics.Ariana Buscigliopptx
Group Presentation 2 Economics.Ariana Buscigliopptx
 
Best Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDABest Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDA
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
 
Honest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptxHonest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptx
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
 
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBCSTRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
 

Data Visualization using different python libraries.pptx

  • 1. DATA VISUALIZATION USING DIFFERENT PYTHON LIBRARIES (E.G., PANDAS, NUMPY, MATPLOTLIB) TEHMIMA ISMAIL 0000412064 MSCS-II
  • 2. WHAT IS DATA VISUALIZATION? • Introduction to Data Visualization • Definition: "Field in data analysis, visually represents data." • Purpose: "Effectively communicates inferences through graphics." • Benefit: "Provides a quick visual summary of data." • Tools: "Utilizes pictures, maps, and graphs." • Advantage: "Easier processing and understanding for the human mind." • Application: "Applicable to both small and large data sets." • Challenge: "Impossible manual processing for large data sets."
  • 3. DATA VISUALIZATION IN PYTHON • Python offers several plotting libraries, namely Matplotlib, Seaborn and many other such data visualization packages with different features for creating informative, customized, and appealing plots to present data in the most simple and effective way.
  • 4. MATPLOTLIB AND SEABORN • Matplotlib and Seaborn are python libraries that are used for data visualization. • They have inbuilt modules for plotting different graphs. • Matplotlib is used to embed graphs into applications. • Seaborn is primarily used for statistical graphs.
  • 5. LINE CHARTS • A Line chart is a graph that represents information as a series of data points connected by a straight line. • In line charts, each data point or marker is plotted and connected with a line or curve. Let's consider the apple yield (tons per hectare) in Kanto. Let's plot a line graph using this data and see how the yield of apples changes over time. We start by importing Matplotlib and Seaborn.
  • 6. USING MATPLOTLIB We are using random data points to represent the yield of apples.
  • 7. To better understand the graph and its purpose, we can add the x-axis values too.
  • 8. • Let's add labels to the axes so that we can show what each axis represents.
  • 9. . • To plot multiple datasets on the same graph, just use the plt.plot function once for each dataset. Let's use this to compare the yields of apples vs. oranges on the same graph.
  • 10. We can add a legend which tells us what each line in our graph means. To understand what we are plotting, we can add a title to our graph.
  • 11. To show each data point on our graph, we can highlight them with markers using the marker argument. Many different marker shapes like a circle, cross, square, diamond, etc. are provided by Matplotlib.
  • 12. You can use the plt.figure function to change the size of the figure.
  • 13. USING SEABORN • An easy way to make your charts look beautiful is to use some default styles from the Seaborn library. These can be applied globally using the sns.set_style function.
  • 14. • We can also use the darkgrid option to change the background color to a darker shade
  • 15. BAR GRAPHS • Categorical Data Representation: • Utilize bar graphs for effective representation. • Y-axis: Represents values; X-axis: Represents categories. • Axis Interpretation: • Y-axis reflects numerical data values. • X-axis denotes categorical data labels. • Data-Category Relationship: • Bars visually linked to specific categories. • Offers clear representation of data distribution. • Effective Communication: • Facilitates easy communication of categorical data. • Provides quick understanding. • Flexibility for Categorical Data: • Applicable to various types of categorical data. • Enables easy comparison between different categories.
  • 17. WE CAN ALSO STACK BARS ON TOP OF EACH OTHER. LET'S PLOT THE DATA FOR APPLES AND ORANGES
  • 18. PLOTTING AVERAGES OF EACH BAR • We can draw a bar chart to visualize how the average bill amount varies across different days of the week. We can do this by computing the day-wise averages and then using plt.bar. The Seaborn library also provides a barplot function that can automatically compute averages.
  • 19. PLOTTING MULTIPLE BAR GRAPHS • If you want to compare bar plots side-by-side, you can use the hue argument. The comparison will be done based on the third feature specified in this argument.
  • 20. PLOTTING HORIZONTAL BAR GRAPHS • You can make the bars horizontal by switching the axes.
  • 21. HISTOGRAMS Histogram Overview: • Utilizes bars to represent data variation across a range. • Y-axis indicates data frequency, while the X-axis shows value ranges. • Bars represent data quantities within specific value ranges.
  • 22. IRIS DATASET • Let's again use the ‘Iris’ data which contains information about flowers to plot histograms.
  • 23. PLOTTING HISTOGRAMS • Now, let’s plot a histogram using the hist() function.
  • 24. CHANGING NUMBER OF BINS • We can control the number or size of bins too
  • 25. CHANGING NUMBER AND SIZE OF BINS • We can change the number and size of bins using numpy too.
  • 26. BINS OF UNEQUAL SIZE • We can create bins of unequal size too.
  • 27. MULTIPLE HISTOGRAMS • Similar to line charts, we can draw multiple histograms in a single chart. We can reduce each histogram's opacity so that one histogram's bars don't hide the others'. Let's draw separate histograms for each species of flowers.
  • 28. STACKING HISTOGRAMS • Multiple histograms can be stacked on top of one another by setting the stacked parameter to True.
  • 29. 📊STOCK MARKET ANALYSIS 📈 + PREDICTION USING LSTM • Tesla Stock Price, S&P 500 stock data, AMZN, DPZ, BTC, NTFX adjusted May 2013-May2019 +1 Data Project - Stock Market Analysis
  • 30. TIME SERIES DATA • Time Series data is a series of data points indexed in time order. • We will discover and explore data from the stock market, particularly some technology stocks (Apple, Amazon, Google, and Microsoft). We will learn how to use yfinance to get stock information, and visualize different aspects of it using Seaborn and Matplotlib. We will also be predicting future stock prices through a Long Short Term Memory (LSTM) method!
  • 31. WE'LL BE ANSWERING THE FOLLOWING QUESTIONS ALONG THE WAY 1.) What was the change in price of the stock over time 2.) What was the daily return of the stock on average 3.) What was the moving average of the various stocks 4.) What was the correlation between different stocks 5.) How much value do we put at risk by investing in a particular stock 6.) How can we attempt to predict future stock behavior (Predicting the closing price stock price of APPLE inc using LSTM)
  • 32. GETTING THE DATA • The first step is to get the data and load it to memory. • We will get our stock data from the Yahoo Finance website. • Yahoo Finance is a rich resource of financial market data and tools to find compelling investments. • To get the data from Yahoo Finance, we will be using yfinance library which offers a threaded and Pythonic way to download market data from Yahoo.
  • 33. WHAT WAS THE CHANGE IN PRICE OF THE STOCK OVERTIME? • In this section we'll go over how to handle requesting stock information with pandas, and how to analyze basic attributes of a stock.
  • 34.
  • 35. WHAT WAS THE CHANGE IN PRICE OF THE STOCK OVERTIME? https://www.kaggle.com/code/faressayah/stock-market-analysis- prediction-using-lstm?scriptVersionId=117825740&cellId=5
  • 37. DESCRIPTIVE STATISTICS ABOUT THE DATA • .describe() generates descriptive statistics. Descriptive statistics include those that summarize the central tendency, dispersion, and shape of a dataset’s distribution, excluding NaN values. • Analyzes both numeric and object series, as well as DataFrame column sets of mixed data types. The output will vary depending on what is provided. Refer to the notes below for more detail.
  • 38. DESCRIPTIVE STATISTICS ABOUT THE DATA We have only 255 records in one year because weekends are not included in the data
  • 39. INFORMATION ABOUT THE DATA • .info() method prints information about a DataFrame including the index dtype and columns, non-null values, and memory usage.
  • 40. CLOSING PRICE • The closing price is the last price at which the stock is traded during the regular trading day. A stock’s closing price is the standard benchmark used by investors to track its performance over time.
  • 42. VOLUME OF SALES • Volume is the amount of an asset or security that changes hands over some period of time, often over the course of a day. For instance, the stock trading volume would refer to the number of shares of security traded between its daily open and close. Trading volume, and changes to volume over the course of time, are important inputs for technical traders.
  • 44. WHAT WAS THE MOVING AVERAGE OF THE VARIOUS STOCKS?
  • 45. WHAT WAS THE DAILY RETURN OF THE STOCK ON AVERAGE?
  • 46. WHAT WAS THE MOVING AVERAGE OF THE VARIOUS STOCKS?
  • 47. WHAT WAS THE DAILY RETURN OF THE STOCK ON AVERAGE?
  • 48. WHAT WAS THE CORRELATION BETWEEN DIFFERENT STOCKS CLOSING PRICES?
  • 50. HOW MUCH VALUE DO WE PUT AT RISK BY INVESTING IN A PARTICULAR STOCK?
  • 51. HOW MUCH VALUE DO WE PUT AT RISK BY INVESTING IN A PARTICULAR STOCK?
  • 52. PREDICTING THE CLOSING PRICE STOCK PRICE OF APPLE INC:
  • 53. PREDICTING THE CLOSING PRICE STOCK PRICE OF APPLE INC: