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 # Introduction to DataViz ## The What, the Why and the How --- # What is a Graph? ![:vspace 150]() -- .font170[ "Visual representation of information _to help people **make sense** of complex phenomena through data_" ] .right[—Enrico Bertini] --- class: base24 # Acclaimed Historic Examples - Joseph Priestley, 1765: first timeline chart as visual aid for his lectures .center[![](assets/img/ch1/s1/history-priestley.gif)] --- class: base24 # Acclaimed Historic Examples - William Playfair, 1786: first bar chart .center[![:scale 80%](assets/img/ch1/s1/history-playfair-bar.jpg)] --- class: base24 # Acclaimed Historic Examples - William Playfair, 1786: first line (timeseries) chart .center[![:scale 80%](assets/img/ch1/s1/history-playfair-timeseries.png)] --- class: base24 # Acclaimed Historic Examples - William Playfair, 1789: first pie chart (**sadly**) .center[![](assets/img/ch1/s1/history-playfair-pie.jpg)] --- class: base24 # Acclaimed Historic Examples - Florence Nightingale, 1858: polar area diagram that convinced the British Government to improve army hygiene .center[![:scale 90%](assets/img/ch1/s1/history-nightingale.jpg)] --- class: base24 # Acclaimed Historic Examples - John Snow, 1854: map of cholera cases that helped identify the source .center[![:scale 60%](assets/img/ch1/s1/history-snow.jpg)] --- class: base24 # Acclaimed Historic Examples - Charles Joseph Minard, 1869: first flow chart depicting Napoleon's 1812 Russian campaing .center[![](assets/img/ch1/s1/history-minard.png)] --- # Why Graphs? ![:vspace 80]() -- .font170[ Convert data that our working memory cannot retain into **direct visual stimuli** that do not require "reading" ] -- .font140[ - We have a poor working memory (~ 7 elements)... ] -- .font140[ - but our eyes have **superpowers**! - ~ 30% of our brain is dedicated to visual processing - We can process ~ 100 Mbps ] --- # Why Graphs? ![:vspace 150]() .font170[ Visual reasoning is way **faster** and **more reliable** than mental reasoning ] --- # Example: Find the Highest Number .panelset[ .panel[.panel-name[Ready?]] .panel[.panel-name[First try].remark-code[.font140[ | | |:---------:| | 345 | | 33.4 | | 627.8654 | | 1.0057632 | | 9 | | 9.5678 | | 64.5 | | 213 | | 1000 | | 125.89876 | ]]] .panel[.panel-name[Second try].remark-code[.font140[ | | |--------:| | 33.40 | | 627.87 | | 1.01 | | 9.00 | | 125.90 | | 1000.00 | | 345.00 | | 64.50 | | 213.00 | | 9.57 | ]]] .panel[.panel-name[Third try] <img src="ch1_files/figure-html/example-barplot-1.png" width="80%" style="display: block; margin: auto;" /> ] ] --- # Example: The Game of 15 .footnote[From Prof. Pat Hanrahan's EuroVis'09 keynote talk] .panelset[ .panel[.panel-name[Rules] .font140[ 1. There are 2 players 2. Each player takes a digit in turn 3. Once a digit is taken, it cannot be used again 4. The first player to get three digits that sum to 15 wins ] .center.font200[ {1, 2, 3, 4, 5, 6, 7, 8, 9} ] ] .panel[.panel-name[Another version] .center[![](assets/img/ch1/s1/example-tictactoe.png)] ] ] --- # Why Graphs? ![:vspace 100]() .font170[ Visualization allows us to summarize information while retaining details... ... as such, it can reveal information that summary statistics may hide ] --- # Example: Anscombe's Quartet ![](assets/img/ch1/s1/example-anscombe.svg) --- # Example: Datasaurus ![](assets/img/ch1/s1/example-datasaurus.jpeg) --- # Why Graphs? ![:vspace 150]() .font170[ Visualization can be faster than your eyes can move! ] .font140[ - Preattentive features can be detected faster than eye movement (200 ms) ] --- # Example: Preattentive Processing .panelset[ .panel[.panel-name[Preattentive features] .center[![](assets/img/ch1/s1/example-preattentive.png)] ] .panel[.panel-name[Serial search] .center[![](assets/img/ch1/s1/example-serial.png)] ] ] --- # How to Make Graphs? ![:vspace 30]() .font150.center[ Data -> **Mapping** -> **Visual Representation** -> Perception ] -- ![:vspace 30]() .pull-left.font120[ - Opportunity + Responsibility - We can also easily fool ourselves - We need to know how our visual perception works ] .pull-right.center[ ![](assets/img/ch1/s1/example-illusion.jpg) ] --- class: base24 # Visual Representation ![:vspace 20]() - Visual variables, marks and channels - Their best use and limitations ![:vspace 20]() .center[![:scale 80%](assets/img/ch1/s1/example-representation.jpg)] --- class: base24 # Visual Mapping ![:vspace 10]() - How to best map data features to visual features - What options are available (visualization toolbox) - How computer algorithms realize the mapping and turn data into images .center[![:scale 80%](assets/img/ch1/s1/example-mapping.png)] --- # Effective Visualization ![:vspace 60]() -- .font150[ - The extent to which it helps people carry out some data analysis or communication tasks better. ] -- .font150[ - Better? Faster, more accurately, increased confidence, more insights, better decisions, etc. ] -- .font150[ - It can be measured only in relation to these tasks and goals. ] --- class: base24 # Principles of Graphical Excellence .footnote[Tufte, E. R. (2018) _**The visual display of quantitative information**_. Graphics Press.] ![:vspace 20]() -- - Graphical excellence is the **well-designed presentation** of **interesting data**—a matter of _substance_, of _statistics_, and of _design_. -- - Graphical excellence consists of **complex ideas** communicated with **clarity, precision, and efficiency**. -- - Graphical excellence is that which gives to the viewer the **greatest number of ideas** in the **shortest time** with the **least ink** in the **smallest space**. -- - Graphical excellence is nearly always **multivariate**. -- - And graphical excellence requires telling the **truth** about the data. --- class: base24 # Summary -- - A graph - is a **language** to encode information; - converts data into **direct visual stimuli** that do not require "reading"; - has a purpose, which is to **communicate** a summary of **complex phenomena** without giving up on details. -- - As a language, it has a series of elements, **visual features**. -- - We need to learn what's the most appropriate use of such features, and what's the most effective way for **mapping** data features to visual features. -- - A good visualization can only be measured in relation to its goals, and the **principles of graphical excellence** by Tufte are a good starting point as a reference.