0% found this document useful (0 votes)
20 views

4 Visualization

The document discusses best practices and techniques for visualizing data using Python libraries like Matplotlib, Seaborn and Plotly. It covers topics like scatter plots, line plots, bar charts, boxplots and histograms and provides examples of how to create basic and advanced visualizations in Python.

Uploaded by

sdog444514
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views

4 Visualization

The document discusses best practices and techniques for visualizing data using Python libraries like Matplotlib, Seaborn and Plotly. It covers topics like scatter plots, line plots, bar charts, boxplots and histograms and provides examples of how to create basic and advanced visualizations in Python.

Uploaded by

sdog444514
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 28

Data Visualization

Lecture
Welcome to Data!

Big Data, Machine Learning, and their Real World Applications


Pre-College Program
Columbia University, SPS
Recap of EDA
• Pandas library
• DataFrames
• Pandas methods and attributes
• Series
• Visualizing a Dataset
• Filtering
• Indexing
groupby() method
• Aggregates data
by a category
over a column or
groups of
columns.
groupby() method
EDA Continued- if you want to know…
• Pivot tables
• Joining , concatenating , and merging dataframes
What we will learn
• Best practices
• Matplotlib
• Scatterplots
• Line plots
• Bar charts
• Boxplots
• Histograms
Why and How to Visualize Data?
• Communicate your results better!
• Visualize to find patterns and analyze the data
• So many choices…which one to choose?
Good graphs consist of
• Title
• X axis label
• Y axis label
• Legends
Bad Plot Examples
Matplotlib
• Let’s take a dive , look into https://matplotlib.org/ and click on
examples. Explore the different types of graphs there are.
Our First Plot in Python
Adding Title, Style, and Axes Labels
Plotting Numerical and Categorical Data
• Numerical vs numerical – line plots , scatter plots, histograms
• Categorical vs numerical – bar charts, boxplots
Scatterplots
Activity
• Spend a few minutes looking at different variables and plotting
scatterplots for the Pokemon dataset (or your own dataset). Do you
see any correlations?

• Pro Tip: Look up what a “pair plot” is (you will need another library to
plot it).
Line Plots
Bar Charts
• X- axis contains
categorical values
• Y-axis contains
numerical values
• Categorical vs
numerical
Bar Charts
Bar Charts
Boxplots
Histograms
Pie Charts
Which graph to
choose?

https://bookdown.org/ejvanholm/Textbook/displaying-data.html
Seaborn
• Statistical data visualization
• A step up in design from matplotlib
• https://seaborn.pydata.org/
Plotly Express
• Welcome to interactive plots!
• https://plotly.com/python/plotly-express/
Visualization Assignment
• Continue your data exploration
• Create at least 5 plots
• Try to use a variety of plots
• Write down your observations with markdown cells

You might also like