truth, beauty, · truth, beauty, and data session 1 pmap 8921: data visualization with r andrew...

37
Truth, beauty, and data Session 1 PMAP 8921: Data Visualization with R Andrew Young School of Policy Studies May 2020 1 / 37

Upload: others

Post on 28-Jun-2020

6 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Truth, beauty, · Truth, beauty, and data Session 1 PMAP 8921: Data Visualization with R Andrew Young School of Policy Studi es May 2020 x . Plan for today Facts, truth, and beauty

Truth, beauty,and data

Session 1PMAP 8921: Data Visualization with R

Andrew Young School of Policy StudiesMay 2020

1 / 37

Page 2: Truth, beauty, · Truth, beauty, and data Session 1 PMAP 8921: Data Visualization with R Andrew Young School of Policy Studi es May 2020 x . Plan for today Facts, truth, and beauty

Plan for today

Facts, truth, and beauty

Data, truth, and beauty

Beautiful visualizations

Class details

2 / 37

Page 3: Truth, beauty, · Truth, beauty, and data Session 1 PMAP 8921: Data Visualization with R Andrew Young School of Policy Studi es May 2020 x . Plan for today Facts, truth, and beauty

Facts, truth, and beauty

3 / 37

Page 4: Truth, beauty, · Truth, beauty, and data Session 1 PMAP 8921: Data Visualization with R Andrew Young School of Policy Studi es May 2020 x . Plan for today Facts, truth, and beauty

What is truth?

Core principles of the universe?

Underlying trends in society?

Something transcendental?

Reality?

4 / 37

Page 5: Truth, beauty, · Truth, beauty, and data Session 1 PMAP 8921: Data Visualization with R Andrew Young School of Policy Studi es May 2020 x . Plan for today Facts, truth, and beauty

How do we find truth?

Science!

5 / 37

Page 6: Truth, beauty, · Truth, beauty, and data Session 1 PMAP 8921: Data Visualization with R Andrew Young School of Policy Studi es May 2020 x . Plan for today Facts, truth, and beauty

But wait!

Beware of scientism!

"… promotion of science as the best or onlyobjective means by which society should determine

normative and epistemological values"

6 / 37

Page 7: Truth, beauty, · Truth, beauty, and data Session 1 PMAP 8921: Data Visualization with R Andrew Young School of Policy Studi es May 2020 x . Plan for today Facts, truth, and beauty

Science is not the only way

Art

Music

Literature

Religion

Nature7 / 37

Page 8: Truth, beauty, · Truth, beauty, and data Session 1 PMAP 8921: Data Visualization with R Andrew Young School of Policy Studi es May 2020 x . Plan for today Facts, truth, and beauty

CosetteKing Lear

Beethoven's 9th symphony

Nothing here is factual……but it all reveals truth

8 / 37

Page 9: Truth, beauty, · Truth, beauty, and data Session 1 PMAP 8921: Data Visualization with R Andrew Young School of Policy Studi es May 2020 x . Plan for today Facts, truth, and beauty

Facts ≠ truth

9 / 37

Page 10: Truth, beauty, · Truth, beauty, and data Session 1 PMAP 8921: Data Visualization with R Andrew Young School of Policy Studi es May 2020 x . Plan for today Facts, truth, and beauty

Where does truth come whenthere are no facts?

Beauty

10 / 37

Page 11: Truth, beauty, · Truth, beauty, and data Session 1 PMAP 8921: Data Visualization with R Andrew Young School of Policy Studi es May 2020 x . Plan for today Facts, truth, and beauty

Beauty in science

This is also true forscience and mathand other morefactual realms

11 / 37

Page 12: Truth, beauty, · Truth, beauty, and data Session 1 PMAP 8921: Data Visualization with R Andrew Young School of Policy Studi es May 2020 x . Plan for today Facts, truth, and beauty

Rhetoric and beautyλόγος • λέξις

Logos • Lexis

Res • Verba

Essence • Structure

Content • Form

Truth • Beauty12 / 37

Page 13: Truth, beauty, · Truth, beauty, and data Session 1 PMAP 8921: Data Visualization with R Andrew Young School of Policy Studi es May 2020 x . Plan for today Facts, truth, and beauty

Content + form

Art is how we translate core,essential content (or truth!)

to different formsfor specific audiences.

13 / 37

Page 14: Truth, beauty, · Truth, beauty, and data Session 1 PMAP 8921: Data Visualization with R Andrew Young School of Policy Studi es May 2020 x . Plan for today Facts, truth, and beauty

Truth is beautiful

Truth ≠ facts

Truth comes from aestheticcombination of content and form

Facts require beauty to be true

14 / 37

Page 15: Truth, beauty, · Truth, beauty, and data Session 1 PMAP 8921: Data Visualization with R Andrew Young School of Policy Studi es May 2020 x . Plan for today Facts, truth, and beauty

Data, truth, and beauty

15 / 37

Page 16: Truth, beauty, · Truth, beauty, and data Session 1 PMAP 8921: Data Visualization with R Andrew Young School of Policy Studi es May 2020 x . Plan for today Facts, truth, and beauty

head(my_data, 10)

## # A tibble: 10 x 2## x y## <dbl> <dbl>## 1 55.4 97.2## 2 51.5 96.0## 3 46.2 94.5## 4 42.8 91.4## 5 40.8 88.3## 6 38.7 84.9## 7 35.6 79.9## 8 33.1 77.6## 9 29.0 74.5## 10 26.2 71.4

mean(my_data$x)

## [1] 54.26327

mean(my_data$y)

## [1] 47.83225

cor(my_data$x, my_data$y)

## [1] -0.06447185

 

Seems reasonable

 

Seems reasonable

 

No correlation

Just show me the data!

16 / 37

Page 17: Truth, beauty, · Truth, beauty, and data Session 1 PMAP 8921: Data Visualization with R Andrew Young School of Policy Studi es May 2020 x . Plan for today Facts, truth, and beauty

oh no

The Datasaurus Dozen

17 / 37

Page 18: Truth, beauty, · Truth, beauty, and data Session 1 PMAP 8921: Data Visualization with R Andrew Young School of Policy Studi es May 2020 x . Plan for today Facts, truth, and beauty

Raw data is not enoughEach of these has the same mean, standard deviation, variance, and correlation

18 / 37

Page 19: Truth, beauty, · Truth, beauty, and data Session 1 PMAP 8921: Data Visualization with R Andrew Young School of Policy Studi es May 2020 x . Plan for today Facts, truth, and beauty

Humans love patterns

https://doi.org/10.3389/fnins.2014.00265

19 / 37

Page 20: Truth, beauty, · Truth, beauty, and data Session 1 PMAP 8921: Data Visualization with R Andrew Young School of Policy Studi es May 2020 x . Plan for today Facts, truth, and beauty

(Sometimes we love them too much)Pareidolia: seeing patterns that aren't there.

20 / 37

Page 21: Truth, beauty, · Truth, beauty, and data Session 1 PMAP 8921: Data Visualization with R Andrew Young School of Policy Studi es May 2020 x . Plan for today Facts, truth, and beauty

Beauty is necessary to see patterns

21 / 37

Page 22: Truth, beauty, · Truth, beauty, and data Session 1 PMAP 8921: Data Visualization with R Andrew Young School of Policy Studi es May 2020 x . Plan for today Facts, truth, and beauty

Beautiful visualizations

22 / 37

Page 23: Truth, beauty, · Truth, beauty, and data Session 1 PMAP 8921: Data Visualization with R Andrew Young School of Policy Studi es May 2020 x . Plan for today Facts, truth, and beauty

What makes a great visualization?

Truthful

Functional

Beautiful

Insightful

EnlighteningAlberto Cairo, The Truthful Art

23 / 37

Page 24: Truth, beauty, · Truth, beauty, and data Session 1 PMAP 8921: Data Visualization with R Andrew Young School of Policy Studi es May 2020 x . Plan for today Facts, truth, and beauty

What makes a great visualization?"Graphical excellence is the well-designed presentation of

interesting data—a matter of substance, of statistics, and ofdesign … [It] consists of complex ideas communicated with clarity,

precision, and efficiency. … [It] is that which gives to the viewerthe greatest number of ideas in the shortest time with the least

ink in the smallest space … [It] is nearly always multivariate … Andgraphical excellence requires telling the truth about the data."

Edward Tufte, The Visual Display of Quantitative Information, p. 51

24 / 37

Page 25: Truth, beauty, · Truth, beauty, and data Session 1 PMAP 8921: Data Visualization with R Andrew Young School of Policy Studi es May 2020 x . Plan for today Facts, truth, and beauty

What makes a great visualization?

Good aesthetics

No substantive issues

No perceptual issues

Honesty + good judgmentKieran Healy, Data Visualization: A Practical Introduction

25 / 37

Page 26: Truth, beauty, · Truth, beauty, and data Session 1 PMAP 8921: Data Visualization with R Andrew Young School of Policy Studi es May 2020 x . Plan for today Facts, truth, and beauty

What's wrong?

26 / 37

Page 27: Truth, beauty, · Truth, beauty, and data Session 1 PMAP 8921: Data Visualization with R Andrew Young School of Policy Studi es May 2020 x . Plan for today Facts, truth, and beauty

What's wrong?

27 / 37

Page 28: Truth, beauty, · Truth, beauty, and data Session 1 PMAP 8921: Data Visualization with R Andrew Young School of Policy Studi es May 2020 x . Plan for today Facts, truth, and beauty

What's wrong?

28 / 37

Page 29: Truth, beauty, · Truth, beauty, and data Session 1 PMAP 8921: Data Visualization with R Andrew Young School of Policy Studi es May 2020 x . Plan for today Facts, truth, and beauty

Thread by Carl T. Bergstrom

What's right?

29 / 37

Page 30: Truth, beauty, · Truth, beauty, and data Session 1 PMAP 8921: Data Visualization with R Andrew Young School of Policy Studi es May 2020 x . Plan for today Facts, truth, and beauty

Class details

30 / 37

Page 31: Truth, beauty, · Truth, beauty, and data Session 1 PMAP 8921: Data Visualization with R Andrew Young School of Policy Studi es May 2020 x . Plan for today Facts, truth, and beauty

Goal for the class

Recognize and createbeautiful and truthful

visualizations with realworld data

31 / 37

Page 32: Truth, beauty, · Truth, beauty, and data Session 1 PMAP 8921: Data Visualization with R Andrew Young School of Policy Studi es May 2020 x . Plan for today Facts, truth, and beauty

Plan for the class 

32 / 37

Page 33: Truth, beauty, · Truth, beauty, and data Session 1 PMAP 8921: Data Visualization with R Andrew Young School of Policy Studi es May 2020 x . Plan for today Facts, truth, and beauty

Class technology

33 / 37

Page 34: Truth, beauty, · Truth, beauty, and data Session 1 PMAP 8921: Data Visualization with R Andrew Young School of Policy Studi es May 2020 x . Plan for today Facts, truth, and beauty

 

Class technology

34 / 37

Page 35: Truth, beauty, · Truth, beauty, and data Session 1 PMAP 8921: Data Visualization with R Andrew Young School of Policy Studi es May 2020 x . Plan for today Facts, truth, and beauty

The tidyverse

35 / 37

Page 36: Truth, beauty, · Truth, beauty, and data Session 1 PMAP 8921: Data Visualization with R Andrew Young School of Policy Studi es May 2020 x . Plan for today Facts, truth, and beauty

Sucking

“There is no way of knowing nothing about asubject to knowing something about a subject

without going through a period of muchfrustration and suckiness.”

“Push through. You’ll suck less.”Hadley Wickham, author of ggplot2

36 / 37

Page 37: Truth, beauty, · Truth, beauty, and data Session 1 PMAP 8921: Data Visualization with R Andrew Young School of Policy Studi es May 2020 x . Plan for today Facts, truth, and beauty

Karen Rinaldi, "(It's Great to) Suck at Something"

Sucking 

37 / 37