![Page 1: Day$2:$Introduc/on$to$ Visualizaons$ - GitHub Pagesdataiap.github.io/dataiap/lectures/day2.pdf · Char/ng$Library$ • subplot.bar() • subplot.plot() • subplot.scaer • subplot.boxplot()](https://reader036.vdocuments.us/reader036/viewer/2022063003/5f6cb739e914fb48fc1f1b20/html5/thumbnails/1.jpg)
Day 2: Introduc/on to Visualiza/ons
matplotlib
![Page 2: Day$2:$Introduc/on$to$ Visualizaons$ - GitHub Pagesdataiap.github.io/dataiap/lectures/day2.pdf · Char/ng$Library$ • subplot.bar() • subplot.plot() • subplot.scaer • subplot.boxplot()](https://reader036.vdocuments.us/reader036/viewer/2022063003/5f6cb739e914fb48fc1f1b20/html5/thumbnails/2.jpg)
Summarize
![Page 3: Day$2:$Introduc/on$to$ Visualizaons$ - GitHub Pagesdataiap.github.io/dataiap/lectures/day2.pdf · Char/ng$Library$ • subplot.bar() • subplot.plot() • subplot.scaer • subplot.boxplot()](https://reader036.vdocuments.us/reader036/viewer/2022063003/5f6cb739e914fb48fc1f1b20/html5/thumbnails/3.jpg)
Complex
![Page 4: Day$2:$Introduc/on$to$ Visualizaons$ - GitHub Pagesdataiap.github.io/dataiap/lectures/day2.pdf · Char/ng$Library$ • subplot.bar() • subplot.plot() • subplot.scaer • subplot.boxplot()](https://reader036.vdocuments.us/reader036/viewer/2022063003/5f6cb739e914fb48fc1f1b20/html5/thumbnails/4.jpg)
h=p://www.guardian.co.uk/news/datablog/2011/oct/07/us-‐jobless-‐unemployment-‐data
![Page 5: Day$2:$Introduc/on$to$ Visualizaons$ - GitHub Pagesdataiap.github.io/dataiap/lectures/day2.pdf · Char/ng$Library$ • subplot.bar() • subplot.plot() • subplot.scaer • subplot.boxplot()](https://reader036.vdocuments.us/reader036/viewer/2022063003/5f6cb739e914fb48fc1f1b20/html5/thumbnails/5.jpg)
finance.google.com
![Page 6: Day$2:$Introduc/on$to$ Visualizaons$ - GitHub Pagesdataiap.github.io/dataiap/lectures/day2.pdf · Char/ng$Library$ • subplot.bar() • subplot.plot() • subplot.scaer • subplot.boxplot()](https://reader036.vdocuments.us/reader036/viewer/2022063003/5f6cb739e914fb48fc1f1b20/html5/thumbnails/6.jpg)
2
![Page 7: Day$2:$Introduc/on$to$ Visualizaons$ - GitHub Pagesdataiap.github.io/dataiap/lectures/day2.pdf · Char/ng$Library$ • subplot.bar() • subplot.plot() • subplot.scaer • subplot.boxplot()](https://reader036.vdocuments.us/reader036/viewer/2022063003/5f6cb739e914fb48fc1f1b20/html5/thumbnails/7.jpg)
Exploring
![Page 8: Day$2:$Introduc/on$to$ Visualizaons$ - GitHub Pagesdataiap.github.io/dataiap/lectures/day2.pdf · Char/ng$Library$ • subplot.bar() • subplot.plot() • subplot.scaer • subplot.boxplot()](https://reader036.vdocuments.us/reader036/viewer/2022063003/5f6cb739e914fb48fc1f1b20/html5/thumbnails/8.jpg)
Storytelling
h=p://www.gapminder.org/
![Page 9: Day$2:$Introduc/on$to$ Visualizaons$ - GitHub Pagesdataiap.github.io/dataiap/lectures/day2.pdf · Char/ng$Library$ • subplot.bar() • subplot.plot() • subplot.scaer • subplot.boxplot()](https://reader036.vdocuments.us/reader036/viewer/2022063003/5f6cb739e914fb48fc1f1b20/html5/thumbnails/9.jpg)
Anima/on?
![Page 10: Day$2:$Introduc/on$to$ Visualizaons$ - GitHub Pagesdataiap.github.io/dataiap/lectures/day2.pdf · Char/ng$Library$ • subplot.bar() • subplot.plot() • subplot.scaer • subplot.boxplot()](https://reader036.vdocuments.us/reader036/viewer/2022063003/5f6cb739e914fb48fc1f1b20/html5/thumbnails/10.jpg)
Anima/on?
ONLY SOMETIMES
![Page 11: Day$2:$Introduc/on$to$ Visualizaons$ - GitHub Pagesdataiap.github.io/dataiap/lectures/day2.pdf · Char/ng$Library$ • subplot.bar() • subplot.plot() • subplot.scaer • subplot.boxplot()](https://reader036.vdocuments.us/reader036/viewer/2022063003/5f6cb739e914fb48fc1f1b20/html5/thumbnails/11.jpg)
“The Message” Grandmaster Flash (1982)
![Page 12: Day$2:$Introduc/on$to$ Visualizaons$ - GitHub Pagesdataiap.github.io/dataiap/lectures/day2.pdf · Char/ng$Library$ • subplot.bar() • subplot.plot() • subplot.scaer • subplot.boxplot()](https://reader036.vdocuments.us/reader036/viewer/2022063003/5f6cb739e914fb48fc1f1b20/html5/thumbnails/12.jpg)
h=p://www.julieelder.com/wp-‐content/uploads/2010/11/understand_full.jpg
![Page 13: Day$2:$Introduc/on$to$ Visualizaons$ - GitHub Pagesdataiap.github.io/dataiap/lectures/day2.pdf · Char/ng$Library$ • subplot.bar() • subplot.plot() • subplot.scaer • subplot.boxplot()](https://reader036.vdocuments.us/reader036/viewer/2022063003/5f6cb739e914fb48fc1f1b20/html5/thumbnails/13.jpg)
![Page 14: Day$2:$Introduc/on$to$ Visualizaons$ - GitHub Pagesdataiap.github.io/dataiap/lectures/day2.pdf · Char/ng$Library$ • subplot.bar() • subplot.plot() • subplot.scaer • subplot.boxplot()](https://reader036.vdocuments.us/reader036/viewer/2022063003/5f6cb739e914fb48fc1f1b20/html5/thumbnails/14.jpg)
Visualiza/on != Sexy Pictures
![Page 15: Day$2:$Introduc/on$to$ Visualizaons$ - GitHub Pagesdataiap.github.io/dataiap/lectures/day2.pdf · Char/ng$Library$ • subplot.bar() • subplot.plot() • subplot.scaer • subplot.boxplot()](https://reader036.vdocuments.us/reader036/viewer/2022063003/5f6cb739e914fb48fc1f1b20/html5/thumbnails/15.jpg)
h=p://psychcentral.com/blog/archives/2011/06/29/an-‐epidemic-‐of-‐bad-‐infographics-‐depression/
![Page 16: Day$2:$Introduc/on$to$ Visualizaons$ - GitHub Pagesdataiap.github.io/dataiap/lectures/day2.pdf · Char/ng$Library$ • subplot.bar() • subplot.plot() • subplot.scaer • subplot.boxplot()](https://reader036.vdocuments.us/reader036/viewer/2022063003/5f6cb739e914fb48fc1f1b20/html5/thumbnails/16.jpg)
h=p://www.pitchinterac/ve.com/elec/on2008/jobarcs.html
![Page 17: Day$2:$Introduc/on$to$ Visualizaons$ - GitHub Pagesdataiap.github.io/dataiap/lectures/day2.pdf · Char/ng$Library$ • subplot.bar() • subplot.plot() • subplot.scaer • subplot.boxplot()](https://reader036.vdocuments.us/reader036/viewer/2022063003/5f6cb739e914fb48fc1f1b20/html5/thumbnails/17.jpg)
h=p://visualizeit.wordpress.com/category/bad-‐visualiza/on/
![Page 18: Day$2:$Introduc/on$to$ Visualizaons$ - GitHub Pagesdataiap.github.io/dataiap/lectures/day2.pdf · Char/ng$Library$ • subplot.bar() • subplot.plot() • subplot.scaer • subplot.boxplot()](https://reader036.vdocuments.us/reader036/viewer/2022063003/5f6cb739e914fb48fc1f1b20/html5/thumbnails/18.jpg)
The Basics
![Page 19: Day$2:$Introduc/on$to$ Visualizaons$ - GitHub Pagesdataiap.github.io/dataiap/lectures/day2.pdf · Char/ng$Library$ • subplot.bar() • subplot.plot() • subplot.scaer • subplot.boxplot()](https://reader036.vdocuments.us/reader036/viewer/2022063003/5f6cb739e914fb48fc1f1b20/html5/thumbnails/19.jpg)
The Basics blog.okcupid.com
![Page 20: Day$2:$Introduc/on$to$ Visualizaons$ - GitHub Pagesdataiap.github.io/dataiap/lectures/day2.pdf · Char/ng$Library$ • subplot.bar() • subplot.plot() • subplot.scaer • subplot.boxplot()](https://reader036.vdocuments.us/reader036/viewer/2022063003/5f6cb739e914fb48fc1f1b20/html5/thumbnails/20.jpg)
Bar Graph
h=p://blog.okcupid.com
![Page 21: Day$2:$Introduc/on$to$ Visualizaons$ - GitHub Pagesdataiap.github.io/dataiap/lectures/day2.pdf · Char/ng$Library$ • subplot.bar() • subplot.plot() • subplot.scaer • subplot.boxplot()](https://reader036.vdocuments.us/reader036/viewer/2022063003/5f6cb739e914fb48fc1f1b20/html5/thumbnails/21.jpg)
Sca=er Plot
h=p://blog.okcupid.com
![Page 22: Day$2:$Introduc/on$to$ Visualizaons$ - GitHub Pagesdataiap.github.io/dataiap/lectures/day2.pdf · Char/ng$Library$ • subplot.bar() • subplot.plot() • subplot.scaer • subplot.boxplot()](https://reader036.vdocuments.us/reader036/viewer/2022063003/5f6cb739e914fb48fc1f1b20/html5/thumbnails/22.jpg)
Line Graph
h=p://blog.okcupid.com
![Page 23: Day$2:$Introduc/on$to$ Visualizaons$ - GitHub Pagesdataiap.github.io/dataiap/lectures/day2.pdf · Char/ng$Library$ • subplot.bar() • subplot.plot() • subplot.scaer • subplot.boxplot()](https://reader036.vdocuments.us/reader036/viewer/2022063003/5f6cb739e914fb48fc1f1b20/html5/thumbnails/23.jpg)
Choropleth Plots
h=p://blog.okcupid.com
![Page 24: Day$2:$Introduc/on$to$ Visualizaons$ - GitHub Pagesdataiap.github.io/dataiap/lectures/day2.pdf · Char/ng$Library$ • subplot.bar() • subplot.plot() • subplot.scaer • subplot.boxplot()](https://reader036.vdocuments.us/reader036/viewer/2022063003/5f6cb739e914fb48fc1f1b20/html5/thumbnails/24.jpg)
Box Plots
![Page 25: Day$2:$Introduc/on$to$ Visualizaons$ - GitHub Pagesdataiap.github.io/dataiap/lectures/day2.pdf · Char/ng$Library$ • subplot.bar() • subplot.plot() • subplot.scaer • subplot.boxplot()](https://reader036.vdocuments.us/reader036/viewer/2022063003/5f6cb739e914fb48fc1f1b20/html5/thumbnails/25.jpg)
matplotlib Python’s version of Matlab plocng
![Page 26: Day$2:$Introduc/on$to$ Visualizaons$ - GitHub Pagesdataiap.github.io/dataiap/lectures/day2.pdf · Char/ng$Library$ • subplot.bar() • subplot.plot() • subplot.scaer • subplot.boxplot()](https://reader036.vdocuments.us/reader036/viewer/2022063003/5f6cb739e914fb48fc1f1b20/html5/thumbnails/26.jpg)
How matplotlib Draws
![Page 27: Day$2:$Introduc/on$to$ Visualizaons$ - GitHub Pagesdataiap.github.io/dataiap/lectures/day2.pdf · Char/ng$Library$ • subplot.bar() • subplot.plot() • subplot.scaer • subplot.boxplot()](https://reader036.vdocuments.us/reader036/viewer/2022063003/5f6cb739e914fb48fc1f1b20/html5/thumbnails/27.jpg)
Figure object
Figure
![Page 28: Day$2:$Introduc/on$to$ Visualizaons$ - GitHub Pagesdataiap.github.io/dataiap/lectures/day2.pdf · Char/ng$Library$ • subplot.bar() • subplot.plot() • subplot.scaer • subplot.boxplot()](https://reader036.vdocuments.us/reader036/viewer/2022063003/5f6cb739e914fb48fc1f1b20/html5/thumbnails/28.jpg)
Subplot object
Figure
Draw in here Subplot
Draw in here
![Page 29: Day$2:$Introduc/on$to$ Visualizaons$ - GitHub Pagesdataiap.github.io/dataiap/lectures/day2.pdf · Char/ng$Library$ • subplot.bar() • subplot.plot() • subplot.scaer • subplot.boxplot()](https://reader036.vdocuments.us/reader036/viewer/2022063003/5f6cb739e914fb48fc1f1b20/html5/thumbnails/29.jpg)
figure.add_subplot(2, 3, 1)
2 rows
3 columns
![Page 30: Day$2:$Introduc/on$to$ Visualizaons$ - GitHub Pagesdataiap.github.io/dataiap/lectures/day2.pdf · Char/ng$Library$ • subplot.bar() • subplot.plot() • subplot.scaer • subplot.boxplot()](https://reader036.vdocuments.us/reader036/viewer/2022063003/5f6cb739e914fb48fc1f1b20/html5/thumbnails/30.jpg)
figure.add_subplot(2, 3, 1)
2 rows
3 columns
![Page 31: Day$2:$Introduc/on$to$ Visualizaons$ - GitHub Pagesdataiap.github.io/dataiap/lectures/day2.pdf · Char/ng$Library$ • subplot.bar() • subplot.plot() • subplot.scaer • subplot.boxplot()](https://reader036.vdocuments.us/reader036/viewer/2022063003/5f6cb739e914fb48fc1f1b20/html5/thumbnails/31.jpg)
figure.add_subplot(2, 3, 1)
2 rows
3 columns
![Page 32: Day$2:$Introduc/on$to$ Visualizaons$ - GitHub Pagesdataiap.github.io/dataiap/lectures/day2.pdf · Char/ng$Library$ • subplot.bar() • subplot.plot() • subplot.scaer • subplot.boxplot()](https://reader036.vdocuments.us/reader036/viewer/2022063003/5f6cb739e914fb48fc1f1b20/html5/thumbnails/32.jpg)
figure.add_subplot(2, 3, 1)
2 rows
3 columns
1
![Page 33: Day$2:$Introduc/on$to$ Visualizaons$ - GitHub Pagesdataiap.github.io/dataiap/lectures/day2.pdf · Char/ng$Library$ • subplot.bar() • subplot.plot() • subplot.scaer • subplot.boxplot()](https://reader036.vdocuments.us/reader036/viewer/2022063003/5f6cb739e914fb48fc1f1b20/html5/thumbnails/33.jpg)
Char/ng Library
• subplot.bar() • subplot.plot() • subplot.sca=er() • subplot.boxplot()
![Page 34: Day$2:$Introduc/on$to$ Visualizaons$ - GitHub Pagesdataiap.github.io/dataiap/lectures/day2.pdf · Char/ng$Library$ • subplot.bar() • subplot.plot() • subplot.scaer • subplot.boxplot()](https://reader036.vdocuments.us/reader036/viewer/2022063003/5f6cb739e914fb48fc1f1b20/html5/thumbnails/34.jpg)
Lines
Figure
Subplot
![Page 35: Day$2:$Introduc/on$to$ Visualizaons$ - GitHub Pagesdataiap.github.io/dataiap/lectures/day2.pdf · Char/ng$Library$ • subplot.bar() • subplot.plot() • subplot.scaer • subplot.boxplot()](https://reader036.vdocuments.us/reader036/viewer/2022063003/5f6cb739e914fb48fc1f1b20/html5/thumbnails/35.jpg)
Boxes
Figure
Subplot
![Page 36: Day$2:$Introduc/on$to$ Visualizaons$ - GitHub Pagesdataiap.github.io/dataiap/lectures/day2.pdf · Char/ng$Library$ • subplot.bar() • subplot.plot() • subplot.scaer • subplot.boxplot()](https://reader036.vdocuments.us/reader036/viewer/2022063003/5f6cb739e914fb48fc1f1b20/html5/thumbnails/36.jpg)
Polygons
Figure
Subplot
![Page 37: Day$2:$Introduc/on$to$ Visualizaons$ - GitHub Pagesdataiap.github.io/dataiap/lectures/day2.pdf · Char/ng$Library$ • subplot.bar() • subplot.plot() • subplot.scaer • subplot.boxplot()](https://reader036.vdocuments.us/reader036/viewer/2022063003/5f6cb739e914fb48fc1f1b20/html5/thumbnails/37.jpg)
Pain/ng
![Page 38: Day$2:$Introduc/on$to$ Visualizaons$ - GitHub Pagesdataiap.github.io/dataiap/lectures/day2.pdf · Char/ng$Library$ • subplot.bar() • subplot.plot() • subplot.scaer • subplot.boxplot()](https://reader036.vdocuments.us/reader036/viewer/2022063003/5f6cb739e914fb48fc1f1b20/html5/thumbnails/38.jpg)
Overlaps
Figure
Subplot
![Page 39: Day$2:$Introduc/on$to$ Visualizaons$ - GitHub Pagesdataiap.github.io/dataiap/lectures/day2.pdf · Char/ng$Library$ • subplot.bar() • subplot.plot() • subplot.scaer • subplot.boxplot()](https://reader036.vdocuments.us/reader036/viewer/2022063003/5f6cb739e914fb48fc1f1b20/html5/thumbnails/39.jpg)
Overlaps
Figure
Subplot
![Page 40: Day$2:$Introduc/on$to$ Visualizaons$ - GitHub Pagesdataiap.github.io/dataiap/lectures/day2.pdf · Char/ng$Library$ • subplot.bar() • subplot.plot() • subplot.scaer • subplot.boxplot()](https://reader036.vdocuments.us/reader036/viewer/2022063003/5f6cb739e914fb48fc1f1b20/html5/thumbnails/40.jpg)
Choropleth Plots
h=p://blog.okcupid.com
![Page 41: Day$2:$Introduc/on$to$ Visualizaons$ - GitHub Pagesdataiap.github.io/dataiap/lectures/day2.pdf · Char/ng$Library$ • subplot.bar() • subplot.plot() • subplot.scaer • subplot.boxplot()](https://reader036.vdocuments.us/reader036/viewer/2022063003/5f6cb739e914fb48fc1f1b20/html5/thumbnails/41.jpg)
No Easy Way
![Page 42: Day$2:$Introduc/on$to$ Visualizaons$ - GitHub Pagesdataiap.github.io/dataiap/lectures/day2.pdf · Char/ng$Library$ • subplot.bar() • subplot.plot() • subplot.scaer • subplot.boxplot()](https://reader036.vdocuments.us/reader036/viewer/2022063003/5f6cb739e914fb48fc1f1b20/html5/thumbnails/42.jpg)
How Maps are Drawn
![Page 43: Day$2:$Introduc/on$to$ Visualizaons$ - GitHub Pagesdataiap.github.io/dataiap/lectures/day2.pdf · Char/ng$Library$ • subplot.bar() • subplot.plot() • subplot.scaer • subplot.boxplot()](https://reader036.vdocuments.us/reader036/viewer/2022063003/5f6cb739e914fb48fc1f1b20/html5/thumbnails/43.jpg)
How Maps are Drawn
![Page 44: Day$2:$Introduc/on$to$ Visualizaons$ - GitHub Pagesdataiap.github.io/dataiap/lectures/day2.pdf · Char/ng$Library$ • subplot.bar() • subplot.plot() • subplot.scaer • subplot.boxplot()](https://reader036.vdocuments.us/reader036/viewer/2022063003/5f6cb739e914fb48fc1f1b20/html5/thumbnails/44.jpg)
Helper Func/ons
draw_county(subplot, county_id, color)
draw_state(subplot, state, color)
FIPS
![Page 45: Day$2:$Introduc/on$to$ Visualizaons$ - GitHub Pagesdataiap.github.io/dataiap/lectures/day2.pdf · Char/ng$Library$ • subplot.bar() • subplot.plot() • subplot.scaer • subplot.boxplot()](https://reader036.vdocuments.us/reader036/viewer/2022063003/5f6cb739e914fb48fc1f1b20/html5/thumbnails/45.jpg)
dataiap.github.com/dataiap/day2/
![Page 46: Day$2:$Introduc/on$to$ Visualizaons$ - GitHub Pagesdataiap.github.io/dataiap/lectures/day2.pdf · Char/ng$Library$ • subplot.bar() • subplot.plot() • subplot.scaer • subplot.boxplot()](https://reader036.vdocuments.us/reader036/viewer/2022063003/5f6cb739e914fb48fc1f1b20/html5/thumbnails/46.jpg)
git