Week 3
Essential Data Visualization
Agenda
Good Data Visualisations
Austria Solar Energy Report
HOT OR NOT
Setup Google Collab
Relevant columns: Date
Relevant columns: AveragePrice
Relevant columns: Type
QUIZ: What type of data is column ‘type’
Relevant columns: region
Relevant columns: Total Volume
Relevant columns: 4225
Relevant columns: 4770
Relevant columns: 4046
Plotly Express
Plotly Express is the easy-to-use, high-level interface to Plotly, which operates on "tidy" data and produces easy-to-style figures.
Remember this?
Histogram
A histogram is a graphical display of data using bars of different heights. In a histogram, each bar groups numbers into ranges. Taller bars show that more data falls in that range. A histogram displays the shape and spread of continuous sample data.
Histogram of Conventional Avocado Prices
DEMO
What is price range of the highest count? (organic)
1.58-1.59
Comparing two histograms
DEMO
Box Plot
A box plot displays the five-number summary of data set. The five-number summary is the minimum, first quartile, median, third quartile, and maximum.
Box Plot of Conventional Avocado Prices
DEMO
Quiz Plot box plot for organic avocado
What is value of upper fence?
Answer: 2.54
Box Plot for each type of Avocado
DEMO
Line Plot
A line chart or line plot or line graph or curve chart is a type of chart which displays information as a series of data points called 'markers' connected by straight line segments.
Average Price of Conventional Avocado Over Time
DEMO
Quiz: make organic plot. What is the date of the highest peak.
27. Aug 2017
Average Price of Avocado Over Time
DEMO
Bar plot
A bar chart or bar graph is a chart or graph that presents categorical data with rectangular bars with heights or lengths proportional to the values that they represent. The bars can be plotted vertically or horizontally.
Bar Plot vs Histogram
Average Price of Conventional Avocado in 2017
DEMO
Quiz df_2017. How many rows?
Answer: 5722
Groupby Exercice. **How many rows and columns does "df_2017_region_price" have?**
108,3
DEMO
Average Price of Avocado in 2017
DEMO
Scatter Plot
A scatter plot uses coordinates to display values for typically two variables for a set of data. If the points are coded (color/shape/size), one additional variable can be displayed. The data are displayed as a collection of points, each having the value of one variable determining the position on the horizontal axis and the value of the other variable determining the position on the vertical axis.
Correlation between Average Price and Total Volume
DEMO
Correlation in Houston and San Francisco
DEMO
Simple text
simple text can be a great way to communicate
Knaflic, C. N. (2015). Storytelling with data: a data visualization guide for business professionals. Hoboken, New Jersey: John Wiley & Sons, Inc.
Simple text
simple text can be a great way to communicate
Knaflic, C. N. (2015). Storytelling with data: a data visualization guide for business professionals. Hoboken, New Jersey: John Wiley & Sons, Inc.
Never use 3D
Never use 3D
Repeat after me
Repeat after me
I will never use 3D Plots to impress
my managers.
Exception: 3d Scatter Plots
Bar plot as alternative to pie charts.
Knaflic, C. N. (2015). Storytelling with data: a data visualization guide for business professionals. Hoboken, New Jersey: John Wiley & Sons, Inc.
The secret of good plots:
The secret of good plots:
Remove the clutter.
If you don’t remember anything
Remember just this.
Step 1
Remove what has no purpose
Step 1
Remove what has no purpose
Knaflic, C. N. (2015). Storytelling with data: a data visualization guide for business professionals. Hoboken, New Jersey: John Wiley & Sons, Inc.
Gridlines?
Do they help the viewer? �No Gridlines = Better Contrast
Knaflic, C. N. (2015). Storytelling with data: a data visualization guide for business professionals. Hoboken, New Jersey: John Wiley & Sons, Inc.
Knaflic, C. N. (2015). Storytelling with data: a data visualization guide for business professionals. Hoboken, New Jersey: John Wiley & Sons, Inc.
Step 2
Clean your axis.
Knaflic, C. N. (2015). Storytelling with data: a data visualization guide for business professionals. Hoboken, New Jersey: John Wiley & Sons, Inc.
Step 3
The more Obvious
The Better.
Step 3
The more Obvious
The Better.
3483075861872364872136478632875632187640732160873016472613587687215982374872134986213075732984798321503281479832174902579821734987321498278749832174903217
How many 0s?
3483075861872364872136478632875632187640732160873016472613587687215982374872134986213075732984798321503281479832174902579821734987321498278749832174903217
Knaflic, C. N. (2015). Storytelling with data: a data visualization guide for business professionals. Hoboken, New Jersey: John Wiley & Sons, Inc.
Book Recommendation
And no, dont listen the audiobook.