0% found this document useful (0 votes)
28 views13 pages

Section 9 - Data Visualization - Part 1

The document discusses different types of univariate plots including histograms, density plots, bar plots, and box plots that can be used to understand attributes independently from univariate data. Histograms, density plots, and box plots are shown as examples.
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)
28 views13 pages

Section 9 - Data Visualization - Part 1

The document discusses different types of univariate plots including histograms, density plots, bar plots, and box plots that can be used to understand attributes independently from univariate data. Histograms, density plots, and box plots are shown as examples.
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/ 13

Section 9

Data Visualization
part 1
Programming 2
Data Visualization techniques

Data
visualization
techniques

Univariate Multivariate
plots plots

correlation
Histogram Density plots Box plots
matrix plots
1. Univariate Plots: Understanding Attributes
Independently

1. Histograms

from matplotlib import pyplot


from pandas import read_csv
dataset = read_csv(‘udemy_courses.csv’)
dataset.hist()
pyplot.show()
1. Univariate Plots: Understanding Attributes
Independently

2. Matplotlib Plotting

from matplotlib import pyplot


from pandas import read_csv
dataset = read_csv(‘udemy_courses2.csv’)
dataset.plot()
pyplot.show()
1. Univariate Plots: Understanding Attributes
Independently
2.1 Plot with one parameter
from matplotlib import pyplot
from pandas import read_csv
dataset = read_csv(‘udemy_courses2.csv’)
dataset.plot(“level”)
pyplot.show()
1. Univariate Plots: Understanding Attributes
Independently
2.2 Plot with two parameter
from matplotlib import pyplot
from pandas import read_csv
dataset = read_csv(‘udemy_courses.csv’)
d = dataset.head(5)
dataset.plot(x=”course_id",y=”price")
pyplot.show()
Plot kinds

DENSITY BAR BOX


1. Univariate Plots: Understanding Attributes
Independently
3. Density Plots

import matplotlib.pyplot as plt


from pandas import read_csv
dataset = read_csv('udemy_courses.csv')
dataset.plot(kind='density', subplots=True, layout=(3,2))
plt.show()
1. Univariate Plots: Understanding Attributes
Independently
3. Density Plots

import matplotlib.pyplot as plt


import seaborn as sns
from pandas import read_csv
dataset = read_csv('udemy_courses.csv')
dataset.plot(kind='density’)
plt.show()
1. Univariate Plots: Understanding Attributes
Independently

4. Bar Plots
from matplotlib import pyplot
from pandas import read_csv
dataset = read_csv('udemy_courses.csv')
data = dataset.head(30)
data.plot(kind="bar",subplots=True, layout=(3,2))
pyplot.show()
1. Univariate Plots: Understanding Attributes
Independently
5. Box Plots

from matplotlib import pyplot


from pandas import read_csv
dataset = read_csv('udemy_courses.csv')
data = dataset.head(40)
data.plot(kind="box",subplots=True, layout=(3,2))
pyplot.show()

You might also like