class: center, middle, inverse, title-slide .title[ # Data Visualization ] .subtitle[ ## Chapter 1. Fundamentals of Graphical Practice ] .author[ ### Iñaki Úcar ] .institute[ ### Department of Statistics | uc3m-Santander Big Data Institute ] .institute[ ### Master in Computational Social Science ] .date[ ###
Licensed under Creative Commons Attribution
CC BY 4.0
Last generated: 2023-09-27
] --- class: base24, middle, clear - [Introduction to DataViz](ch1_1.html#3) - [Graphical Integrity](ch1_2.html#3) - [Graphical Perception](ch1_3.html#3) - [Principles of Graphical Representation](ch1_4.html#3) --- class: inverse, center, middle # Graphical Integrity ## How to Lie with Graphs --- class: base24 # Bad Charts ![:vspace 50]() - We live surrounded by bad charts - For many people, statistical charts = **lie** -- ![:vspace 30]() - Deception vs. ineptitude - Lack of **quantitative skills**, _anumerism_ - Lack of knowledge about **visual perception** - Lack of **visual skills** - Intention to **deceive** --- class: base24 # Sources of Bad Charts - For Tufte: - Distortion - Data variation - Visual area and numerical measure - Context -- - But there are many more **common patterns**: - Bad representation (deception, sometimes) - Bad data - Too many data (optimism) - Too little data (optimism) - Hiding relevant data (deception) - Wrong representation (deception) - Creativity (without skill) --- # Prologue: Pie Charts .panelset[ .panel[.panel-name[See the pattern?] .center[![](assets/img/ch1/s2/bad-pie1.png)] ] .panel[.panel-name[Second try] .center[![](assets/img/ch1/s2/bad-pie2.png)] ] .panel[.panel-name[The only acceptable one] .center[![](assets/img/ch1/s2/bad-pie3.png)] ] ] --- # Bad Representation: Areas .panelset[ .panel[.panel-name[See the pattern?] .center[![](assets/img/ch1/s2/bad-area1.png)] ] .panel[.panel-name[Second try] .center[![](assets/img/ch1/s2/bad-area2.png)] ] ] --- # Bad Representation: Longitudes .panelset[ .panel[.panel-name[Deception 1] - Cutting the origin is the most common deception technique with bar plots ![:vspace 50]() .pull-left[.center[![](assets/img/ch1/s2/bad-bar1.png)]] .pull-right[.center[![](assets/img/ch1/s2/bad-bar2.png)]] ] .panel[.panel-name[Deception 2] .center[![](assets/img/ch1/s2/bad-bar3.png)] ] .panel[.panel-name[Ineptitude 1] .center[![](assets/img/ch1/s2/bad-bar4.png)] ] .panel[.panel-name[Ineptitude 2] - Some well-intentioned axis cuts may have nefarious consequences ![:vspace 50]() .pull-left[.center[![](assets/img/ch1/s2/bad-bar5.png)]] .pull-right[.center[![](assets/img/ch1/s2/bad-bar6.png)]] ] ] --- # Bad Data .panelset[ .panel[.panel-name[Population maps] .center[![](assets/img/ch1/s2/bad-data1.png)] ] .panel[.panel-name[Irrelevant data] .center[![](assets/img/ch1/s2/bad-data2.jpg)] ] .panel[.panel-name[Bonus] .center[![:scale 80%](assets/img/ch1/s2/bad-data3.jpg)] ] .panel[.panel-name[Non-comparable] .center[![](assets/img/ch1/s2/bad-data4.png)] ] .panel[.panel-name[Not related] .center[![](assets/img/ch1/s2/bad-data5.png)] - See [Spurious correlations](https://www.tylervigen.com/spurious-correlations) for more fun ] ] --- # Too Many Data .panelset[ .panel[.panel-name[Pie horror 1] .center[![](assets/img/ch1/s2/bad-many1.jpg)] ] .panel[.panel-name[Pie horror 2] .center[![](assets/img/ch1/s2/bad-many2.png)] ] ] --- # Too Little Data .panelset[ .panel[.panel-name[Optimist 1] .center[![](assets/img/ch1/s2/bad-little1.png)] ] .panel[.panel-name[Optimist 2] .center[![](assets/img/ch1/s2/bad-little2.png)] ] .panel[.panel-name[Scientific optimist] .center[![](assets/img/ch1/s2/bad-little3.png)] ] .panel[.panel-name[+bad interpretation] .center[![](assets/img/ch1/s2/bad-little4.png)] ] ] --- # Hiding Relevant Data .panelset[ .panel[.panel-name[No context] ![:vspace 50]() .center[![](assets/img/ch1/s2/bad-hide1.png)] ] .panel[.panel-name[More context] ![:vspace 50]() .center[![](assets/img/ch1/s2/bad-hide2.png)] ] .panel[.panel-name[Complete picture] ![:vspace 50]() .center[![](assets/img/ch1/s2/bad-hide3.png)] ] .panel[.panel-name[Context!] .center[![](assets/img/ch1/s2/bad-hide4.png)] ] ] --- # Wrong Representation .panelset[ .panel[.panel-name[Level 1] .center[![](assets/img/ch1/s2/bad-wrong1.png)] ] .panel[.panel-name[Level 2] .center[![](assets/img/ch1/s2/bad-wrong2.png)] ] .panel[.panel-name[Level 3] .center[![](assets/img/ch1/s2/bad-wrong3.png)] ] .panel[.panel-name[Level 4] .center[![](assets/img/ch1/s2/bad-wrong4.jpg)] ] .panel[.panel-name[Level 5] .center[![](assets/img/ch1/s2/bad-wrong5.jpg)] ] .panel[.panel-name[Level 6] .center[![](assets/img/ch1/s2/bad-wrong6.jpg)] ] ] --- # Creativity .panelset[ .panel[.panel-name[Level 1] .center[![](assets/img/ch1/s2/bad-creativity1.png)] ] .panel[.panel-name[Level 2] .center[![](assets/img/ch1/s2/bad-creativity2.png)] ] .panel[.panel-name[Level 3] .center[![](assets/img/ch1/s2/bad-creativity3.png)] ] .panel[.panel-name[Level 4] .center[![](assets/img/ch1/s2/bad-creativity4.png)] ] .panel[.panel-name[Level 5] .center[![](assets/img/ch1/s2/bad-creativity5.png)] ] .panel[.panel-name[Level 6] .center[![:scale 60%](assets/img/ch1/s2/bad-creativity6.png)] ] ] --- # Bonus: Scientific Horrors .panelset[ .panel[.panel-name[3D] .center[![](assets/img/ch1/s2/bad-scientific1.jpg)] ] .panel[.panel-name[Linear relationship?] .center[![](assets/img/ch1/s2/bad-scientific2.jpg)] ] .panel[.panel-name[Quadratic relationship?] .center[![:scale 60%](assets/img/ch1/s2/bad-scientific3.jpg)] ] .panel[.panel-name[Other?] .center[![:scale 60%](assets/img/ch1/s2/bad-scientific4.jpg)] ] .panel[.panel-name[Whatever] .center[![:scale 60%](assets/img/ch1/s2/bad-scientific5.jpg)] ] ] --- # 12 Rules to Display Data Badly .footnote[Wainer, H. (1984) **How to Display Data Badly**. _The American Statistician_ 38(2), pp. 137-147.] -- .pull-left[ ### Showing data - Rule 1. Show as few data as possible (minimize the data density) - Rule 2. Hide what data you do show (minimize the data-ink ratio) ] -- .pull-right[ ### Showing data accurately - Rule 3. Ignore the visual metaphor altogether - Rule 4. Only order matters - Rule 5. Graph data out of context ] -- ### Showing data clearly - Rule 6. Change scales in mid-axis - Rule 7. Emphasize the trivial (ignore the important) - Rule 8. Jiggle the baseline - Rule 9. Austria first! - Rule 10. Label illegibly, incompletely, incorrectly, and ambiguously - Rule 11. More is murkier: more decimal places and more dimensions - Rule 12. If it has been done well in the past, think of another way to do it --- # Chart Rethinking: Exercise 1 .footnote[https://junkcharts.typepad.com] .panelset[ .panel[.panel-name[Original] .center[![:scale 60%](assets/img/ch1/s2/rethinking11.jpg)] ] .panel[.panel-name[Iteration 1] .center[![:scale 60%](assets/img/ch1/s2/rethinking12.png)] ] .panel[.panel-name[Iteration 2] .center[![:scale 52%](assets/img/ch1/s2/rethinking13.png)] ] ] --- # Chart Rethinking: Exercise 2 .footnote[https://junkcharts.typepad.com] .panelset[ .panel[.panel-name[Original] .center[![:scale 70%](assets/img/ch1/s2/rethinking21.png)] ] .panel[.panel-name[Iteration 1] .center[![](assets/img/ch1/s2/rethinking22.png)] ] .panel[.panel-name[Iteration 2] .center[![:scale 45%](assets/img/ch1/s2/rethinking23.png)] ] ] --- # Chart Rethinking: Exercise 3 .footnote[https://www.datanalytics.com/] .panelset[ .panel[.panel-name[Original] .center[![](assets/img/ch1/s2/rethinking31.png)] ] .panel[.panel-name[Original] .center[![:scale 40%](assets/img/ch1/s2/rethinking32.png)] ] .panel[.panel-name[Iteration 1] .center[![:scale 40%](assets/img/ch1/s2/rethinking33.png)] ] ] --- # Chart Rethinking: Exercise 4 .footnote[https://junkcharts.typepad.com] .panelset[ .panel[.panel-name[Original] .center[![:scale 33%](assets/img/ch1/s2/rethinking41.png)] ] .panel[.panel-name[Iteration 1] .center[![:scale 62%](assets/img/ch1/s2/rethinking42.png)] ] ] --- # Chart Rethinking: Exercise 5 .footnote[https://junkcharts.typepad.com] .panelset[ .panel[.panel-name[Original] .center[![](assets/img/ch1/s2/rethinking51.png)] ] .panel[.panel-name[Iteration 1] .center[![:scale 75%](assets/img/ch1/s2/rethinking52.png)] ] .panel[.panel-name[A word of caution] .center[![](assets/img/ch1/s2/rethinking53.png)] ] ] --- # Chart Rethinking: Exercise 6 .footnote[Schwabish, J. A. (2014). _An Economist’s Guide to Visualizing Data_] .panelset[ .panel[.panel-name[Original] .center[![:scale 78%](assets/img/ch1/s2/rethinking61.png)] ] .panel[.panel-name[Iteration 1] .center[![:scale 75%](assets/img/ch1/s2/rethinking62.png)] ] ] --- # Chart Rethinking: Exercise 7 .footnote[Schwabish, J. A. (2014). _An Economist’s Guide to Visualizing Data_] .panelset[ .panel[.panel-name[Original] .center[![:scale 78%](assets/img/ch1/s2/rethinking71.png)] ] .panel[.panel-name[Iteration 1] .center[![:scale 43%](assets/img/ch1/s2/rethinking72.png)] ] ] --- # Chart Rethinking: Exercise 8 .footnote[Schwabish, J. A. (2014). _An Economist’s Guide to Visualizing Data_] .panelset[ .panel[.panel-name[Original] .center[![:scale 97%](assets/img/ch1/s2/rethinking81.png)] ] .panel[.panel-name[Iteration 1] .center[![:scale 84%](assets/img/ch1/s2/rethinking82.png)] ] ] --- class: base24 # Summary -- - We live surrounded by **bad charts**, either by deception or ineptitude. -- - There are some **common patterns** to be aware of.<br> From those, we can distill a series of **basic rules**: -- - Pie charts are very rarely justified. - Areas are tricky. - 3D is rarely justified in 2D mediums. - Axes (cuts, scales...) should be clear. - Proper context should be shown when relevant. - Do not go beyond what data tells. - There are **well-established visual metaphors**. - E.g. up-down for positive-negative. - E.g. areas are perceived as whole quantities,<br> so cutting the axis is deceiving.