SlideShare a Scribd company logo
1 of 54
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

Introduction to Apache Hive
Introduction to Apache HiveIntroduction to Apache Hive
Introduction to Apache HiveAvkash Chauhan
 
Big data analytics, research report
Big data analytics, research reportBig data analytics, research report
Big data analytics, research reportJULIO GONZALEZ SANZ
 
Optimizing Hive Queries
Optimizing Hive QueriesOptimizing Hive Queries
Optimizing Hive QueriesOwen O'Malley
 
Introduction to Data Warehouse
Introduction to Data WarehouseIntroduction to Data Warehouse
Introduction to Data WarehouseShanthi Mukkavilli
 
Big Data, Big Deal: For Future Big Data Scientists
Big Data, Big Deal: For Future Big Data ScientistsBig Data, Big Deal: For Future Big Data Scientists
Big Data, Big Deal: For Future Big Data ScientistsWay-Yen Lin
 
Python Seaborn Data Visualization
Python Seaborn Data Visualization Python Seaborn Data Visualization
Python Seaborn Data Visualization Sourabh Sahu
 
Introduction to Data Engineering
Introduction to Data EngineeringIntroduction to Data Engineering
Introduction to Data EngineeringDurga Gadiraju
 
Introduction to snowflake
Introduction to snowflakeIntroduction to snowflake
Introduction to snowflakeSunil Gurav
 
In-Memory Big Data Analytics
In-Memory Big Data AnalyticsIn-Memory Big Data Analytics
In-Memory Big Data AnalyticsSupreeth M P
 
Big data by Mithlesh sadh
Big data by Mithlesh sadhBig data by Mithlesh sadh
Big data by Mithlesh sadhMithlesh Sadh
 
Dimensional Modeling
Dimensional ModelingDimensional Modeling
Dimensional Modelingaksrauf
 
Building an Activity Feed with Cassandra
Building an Activity Feed with CassandraBuilding an Activity Feed with Cassandra
Building an Activity Feed with CassandraMark Dunphy
 
The Importance of Master Data Management
The Importance of Master Data ManagementThe Importance of Master Data Management
The Importance of Master Data ManagementDATAVERSITY
 
Data preprocessing in Data Mining
Data preprocessing in Data MiningData preprocessing in Data Mining
Data preprocessing in Data MiningDHIVYADEVAKI
 

What's hot (20)

Introduction to Apache Hive
Introduction to Apache HiveIntroduction to Apache Hive
Introduction to Apache Hive
 
Data Quality
Data QualityData Quality
Data Quality
 
Data preprocessing
Data preprocessingData preprocessing
Data preprocessing
 
Big data analytics, research report
Big data analytics, research reportBig data analytics, research report
Big data analytics, research report
 
Python for Data Science
Python for Data SciencePython for Data Science
Python for Data Science
 
Optimizing Hive Queries
Optimizing Hive QueriesOptimizing Hive Queries
Optimizing Hive Queries
 
Introduction to Data Warehouse
Introduction to Data WarehouseIntroduction to Data Warehouse
Introduction to Data Warehouse
 
Big Data, Big Deal: For Future Big Data Scientists
Big Data, Big Deal: For Future Big Data ScientistsBig Data, Big Deal: For Future Big Data Scientists
Big Data, Big Deal: For Future Big Data Scientists
 
Python Seaborn Data Visualization
Python Seaborn Data Visualization Python Seaborn Data Visualization
Python Seaborn Data Visualization
 
Introduction to Data Engineering
Introduction to Data EngineeringIntroduction to Data Engineering
Introduction to Data Engineering
 
Data warehouse
Data warehouseData warehouse
Data warehouse
 
Introduction to snowflake
Introduction to snowflakeIntroduction to snowflake
Introduction to snowflake
 
DATA WAREHOUSING AND DATA MINING
DATA WAREHOUSING AND DATA MININGDATA WAREHOUSING AND DATA MINING
DATA WAREHOUSING AND DATA MINING
 
In-Memory Big Data Analytics
In-Memory Big Data AnalyticsIn-Memory Big Data Analytics
In-Memory Big Data Analytics
 
Big data by Mithlesh sadh
Big data by Mithlesh sadhBig data by Mithlesh sadh
Big data by Mithlesh sadh
 
Dimensional Modeling
Dimensional ModelingDimensional Modeling
Dimensional Modeling
 
AWS Big Data Platform
AWS Big Data PlatformAWS Big Data Platform
AWS Big Data Platform
 
Building an Activity Feed with Cassandra
Building an Activity Feed with CassandraBuilding an Activity Feed with Cassandra
Building an Activity Feed with Cassandra
 
The Importance of Master Data Management
The Importance of Master Data ManagementThe Importance of Master Data Management
The Importance of Master Data Management
 
Data preprocessing in Data Mining
Data preprocessing in Data MiningData preprocessing in Data Mining
Data preprocessing in Data Mining
 

Similar to Data Visualization using different python libraries.pptx

datavisualization-5thUnit.pdf
datavisualization-5thUnit.pdfdatavisualization-5thUnit.pdf
datavisualization-5thUnit.pdfBrijeshPatil13
 
Introduction to matplotlib
Introduction to matplotlibIntroduction to matplotlib
Introduction to matplotlibPiyush rai
 
Aftros
Aftros Aftros
Aftros Sezzar
 
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.pptxBhagyasriPatel2
 
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
 
Data visualization representation of Analytics data
Data visualization representation of Analytics  dataData visualization representation of Analytics  data
Data visualization representation of Analytics dataPrasad Narasimhan
 
Visual Analytics in Big Data
Visual Analytics in Big DataVisual Analytics in Big Data
Visual Analytics in Big DataSaurabh Shanbhag
 
Introduction of data science
Introduction of data scienceIntroduction of data science
Introduction of data scienceTanujaSomvanshi1
 
IBM Cognos tutorial - ABC LEARN
IBM Cognos tutorial - ABC LEARNIBM Cognos tutorial - ABC LEARN
IBM Cognos tutorial - ABC LEARNabclearnn
 
OLAP OnLine Analytical Processing
OLAP OnLine Analytical ProcessingOLAP OnLine Analytical Processing
OLAP OnLine Analytical ProcessingWalid Elbadawy
 
M. FLORENCE DAYANA/DATABASE MANAGEMENT SYSYTEM
M. FLORENCE DAYANA/DATABASE MANAGEMENT SYSYTEMM. FLORENCE DAYANA/DATABASE MANAGEMENT SYSYTEM
M. FLORENCE DAYANA/DATABASE MANAGEMENT SYSYTEMDr.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
 
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
 
Data visualisationresearch
Data visualisationresearchData visualisationresearch
Data visualisationresearch
 

Recently uploaded

Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
internship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerinternship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerunnathinaik
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Biting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfBiting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfadityarao40181
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting DataJhengPantaleon
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,Virag Sontakke
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfMahmoud M. Sallam
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 

Recently uploaded (20)

Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
internship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerinternship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developer
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Biting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfBiting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdf
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdf
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 

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: