diff --git a/01_materials/slides/04_choosing_the_right_visualization.pdf b/01_materials/slides/04_choosing_the_right_visualization.pdf index b4fe089b5..9dcbc86a5 100644 Binary files a/01_materials/slides/04_choosing_the_right_visualization.pdf and b/01_materials/slides/04_choosing_the_right_visualization.pdf differ diff --git a/03_instructional_team/04_choosing_the_right_visualization.md b/03_instructional_team/04_choosing_the_right_visualization.md new file mode 100644 index 000000000..50b1c64b6 --- /dev/null +++ b/03_instructional_team/04_choosing_the_right_visualization.md @@ -0,0 +1,559 @@ +--- +marp: true +theme: dsi_certificates_theme +paginate: true +--- + +# Data Visualization: Choosing the Right Visualization + +```code +$ echo "Data Sciences Institute" +``` + +--- + + +# We’re going to… + +- Explore how to choose the right data visualization for a given situation + +- Explore [Chapter 3 (](https://data-feminism.mitpress.mit.edu/pub/5evfe9yd/release/5) [On Rational, Scientific, Objective Viewpoints from Mythical, Imaginary, Impossible Standpoints](https://data-feminism.mitpress.mit.edu/pub/5evfe9yd/release/5) [) of D’Ignazio and Klein (2020). Data Feminism. MIT Press.](https://data-feminism.mitpress.mit.edu/pub/5evfe9yd/release/5) + +- Discuss how ideas of neutrality and objectivity apply to data visualization + +- Understand how different elements and types of data visualization are generally perceived, and use this understanding to decide what kind of visualization we should use for a particular situation + + + +----- +# Agenda for today + +- Go through slide deck #4: Choosing the right visualization +- Discuss assignment 2 + +------ + +# Review - How does matplotlib work? + +- A **figure** is like a container that holds a set of **axes** + +- The axes is our actual plot or graph + +- A figure can hold multiple axes (like subplots) + +- Every visual element of our plots – colour, legends, axis titles and scales, text – is called an **artist** and belongs to an axes (not to a figure) + +------ + +# Review - Making a figure with matplotlib + +- Create a **Figure** container and one **Axes** (subplot) inside it; store them in fig and ax + + +``` + fig, ax = plt.subplots(figsize=(5, 3)) +``` + +- If we color the `fig` object red and the `ax` object green, we get the following result: + +![w:500](./images/fig_axes.png) + +------- + +# Review - Making a figure with matplotlib + +- Make our basic scatterplot: + +``` +fig, ax = plt.subplots(figsize=(5, 3)) +ax.scatter(x,y) +fig.show() + +``` +![w:450](./images/fig_axes.png) + + +------ + +# Review - Example + +![w:500](./images/fig_axes2.png) + +- Figure = the entire canvas (in red) that contains everything + +- Axes = the plotting area inside a figure (the green boxes with x/y ticks where data is drawn). + +---- + +### - So far, we have learned how to make and modify different types of data visualizations +### - How do we decide which of these types of data visualization to use, and when? +### - If we are accurately and honestly displaying our data, does the type of visualization even matter? + +--- + +# How do we choose the 'right' visualization? + + +--- + +# Activity + +- We will explore two data visualizations, each showing similar datasets with different techniques +- For each visualization, discuss the following questions: + - What information can we learn from this visualization? + - Is this an example of objective, neutral data visualization? Why or why not? + + + +--- + +# Visualization #1: US Gun Killings in 2018 +![w:900](./images/04_us_gun_killings_in_2018.png) + +[🔗 source](https://guns.periscopic.com/) + + + +--- + +# Visualization #2: Washington Post Active Shooters +![w:700](./images/04_the_era_of_active_shooters.png) + + + +--- + +# Visualization #1: US Gun Killings in 2018 +![bg right:40% w:400](./images/04_us_gun_killings_in_2018.png) + +- Periscopic’s animated visualization shows the expected years of life lost to gun violence in the United States in 2018 +- It emphasizes an emotion: a sense of loss +- This visualization has been criticized as [“actively [shaping] data to support a cause”](https://data-feminism.mitpress.mit.edu/pub/5evfe9yd/release/5) (in this case, highlighting a lack of gun control in the United States) + + + + +--- + +# Visualization #2: Washington Post Active Shooters +![bg right:40% w:400](./images/04_the_era_of_active_shooters.png) + +- The next visualization shows a related dataset (about gun violence in the United States) + +- Viewers will likely reach a similar conclusion as in Visualization #1, but this plot is intended to present [“a deliberately neutral emotional field, a blank page in effect, upon which viewers are more free to choose their own response to the information” ](https://data-feminism.mitpress.mit.edu/pub/5evfe9yd/release/5) + +--- + +### What qualities or visual elements of Visualization #2 help to make it a “blank page”? + +--- + +# A blank page + +![bg right:50% w:500](./images/04_unemployment_rate_1.png) + +- Some of the same design elements from our ‘blank page’ Visualization #2 can be seen in this New York Times visualization of the September 2012 Jobs Report + +- The clean, 2D layout is designed to avoid conveying an emotional narrative to the audience + + +--- + +# A blank page… right? + +- The Jobs Report graphic was published alongside another image: + +![](./images/04_jobs_report_graphic_vs.png) + +--- + +# A blank page + +- Images A and B were designed to show the exact same data from the perspectives of Republicans and Democrats, respectively +- Image A emphasizes the unemployment rate staying above 8%, while Image B emphasizes the rate’s decline +- **Neither is technically dishonest!** + +![bg right:50% w:450](./images/04_jobs_report_graphic_vs_vertical.png) + +--- + +# Supporting a cause + +- Periscopic’s Gun Killings visualization won several year-end information visualization awards +- This visualization is not neutral, and conveys an emotional narrative to the audience… +- **…But this visualization is not dishonest either!** + +![bg right:50% w:500](./images/04_us_gun_killings_in_2018.png) + +--- + +### So where does this leave us in our search for neutral, objective data visualization? + +--- + +### Can data visualization be neutral? + +--- + +# Short answer: +NO! + +--- + +# “The constraints of truth leave a very wide space for interpretation…” + +# [(Stray, 2016)](https://towcenter.gitbooks.io/curious-journalist-s-guide-to-data/content/) + + + +--- + +# Data visualizations as rhetorical objects +- **Rhetoric** is the act of communicating effectively and persuasively + +- From D’Ignazio and Klein (2020), + + > “Any communicating object that reflects choices about the selection and representation of reality is a rhetorical object. Whether or not it is rhetorical (it always is) has nothing to do with whether or not it is true (it may or may not be).” + +- That is, **we make choices about how to visualize our data, so these visualizations are not neutral…** +- **…BUT data visualizations can be factual without being neutral** + + + +--- + +# Data visualization as an interpretative, rhetorical act is not necessarily a bad thing, but one that we should be aware of. + +--- + +# Recall + +- Three important qualities of data visualization: + - Is the visualization pleasing to look at? → **Aesthetic** + - Does the visualization accurately and honestly present data? → **Substantive** + - Can we understand what message the maker of the visualization is attempting to convey? → **Perceptual** + + + +--- + +- Two data visualizations can share the same substantive qualities while, intentionally or not, being perceived completely differently + +- When we are aware of the choices we make while creating data visualizations, we can design data visualizations that are suited to the situation at hand (perceptual qualities) without sacrificing honesty and accuracy (substantive qualities) + +--- + +# What do we want our data visualization to do? + + +--- + +# Intended purpose + +![](./images/04_intended_purpose.png) + + + +--- + +# Intended audience + +![](./images/04_intended_audience.png) + + + +--- + +# Intended medium + +![](./images/04_intended_medium.png) + + + +--- + + +![align-top-centered](./images/04_analysis_framework_what_dataset_types.png) + +- Tables, networks, fields, and geometries are four basic dataset types. +- For any of these dataset types, the full dataset could be available immediately as a static file or it might be dynamic data processed gradually in the form of a stream. + + + +--- + +![bg right:60% w:600](./images/04_analysis_framework_what_attributes.png) + +- Identifying the attribute types for our data will help us make choices about how to visualize it. + + + +--- + +# Effective Visualization + +- Depends on purpose, audience, and medium! +- A good goal is to satisfy: “to find one of the many possible good solutions rather than one of the even larger number of bad ones” + +![h:300](./images/04_design_space.png) + + +--- + +# Different purpose, different results + +![](./images/04_different_purpose_different_results.png) + + + + +--- + +# How is our data visualization perceived? + + +--- + +# Taking advantage of cognitive psychology +- In general, data visualization takes advantage of human cognition to help us understand data more intuitively than we can if it is presented to us as a list or a table ([Li, 2020](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC7303292/)) +- By learning about how humans tend to process visual information, we can communicate more effectively with our graphs. For example… +- **Gestalt principles** (Gestalt is German for shape) are a set of cognitive theories for how people tend to organize visual information; and are commonly used in UX design and data visualization ([Wong, 2010](https://www.nature.com/articles/nmeth1110-863)) + + + +--- + +# Gestalt principles + +![w:1000](./images/04_gestalt_principles.png) + + + +--- +# Gestalt principles + +![w:1000](./images/04_gestalt_principles_2.png) + + + +--- + +# Gestalt principles + +![](./images/04_gestalt_principles_3.png) + + + +--- + +# Cognitive load + +- It can also be helpful to consider **cognitive load** , or the amount of work required to take in new information +- Cognitive load can be divided into: + - **Intrinsic**(the intrinsic complexity of the new information) + - **Germane**(the audience’s familiarity with the information) + - **Extraneous**(complexity from how the information is presented) +- In a data visualization context, extraneous cognitive load is most within our control + + + +--- + +# Cognitive load + +- Elements of a visualization that can affect cognitive load include: + - **Familiar vs. Rare chart types** → rare types increase cognitive load + - **Accurate vs.Approximate interpretation** → relational values or areas (approximate) increase cognitive load compared to absolute values or position (accurate) + - **Concise vs. Detailed composition** → more visual elements increases cognitive load + - **Explanatory vs. Exploratory composition** → a chart that the audience navigates alone increases cognitive load compared to a chart that they are guided through step-by-step + + + +--- + +# Cognition over Memory +- Working memory is limited! +- It’s better to show side-by-side views than using our memory + + + +--- + +# No 3D without Cause + +![](./images/04_3d_example.png) + + + +--- + +# Perceived factual basis + +- Sociologists Kennedy et al. (2016) find that adherence to **four conventions of data visualization** reinforces the perceived objectivity and factual basis of a visualization: + - Two-dimensional image + - Clean layouts + - Geometric shapes and lines + - Inclusion of data sources at the bottom of the image + + + +--- + +# Provenance rhetoric +- Citing the source(s) of our data is not only best practice (reproducibility!), but also helps people to trust our data visualizations more +- **Provenance rhetoric** is the idea that the inclusion of a data source with our graphic signals “[transparency and trustworthiness](http://users.eecs.northwestern.edu/~jhullman/vis_rhetoric.pdf)” to the audience +- This increases the persuasiveness of the visualization, since viewers are more likely to believe what they see + + + +--- + +# Resources for choosing data visualization types + +--- + +# Decision making tools + +There are resources available online that incorporate visualization purpose and cognitive principles into reference guides to help us decide the most suitable data visualization in a given situation + + + +--- + +# The Data Visualization Catalogue +![w:900](./images/04_the_data_visualization_catalogue.png) + + + +--- + +# Financial Times Visual Vocabulary +The Financial Times Visual Vocabulary help sheet is available in both [interactive](https://community.powerbi.com/t5/Data-Stories-Gallery/FT-Visual-Vocabulary-Power-BI-Edition/td-p/584460) (online PowerBI dashboard) and [PDF ](https://github.com/Financial-Times/chart-doctor/blob/main/visual-vocabulary/poster.png)versions + +In both forms, the Visual Vocabulary offers a list of potential functions of visualizations, and several corresponding chart types and examples for each + + + +--- + +# Financial Times Visual Vocabulary + +![w:950](./images/04_visual_vocabulary.png) + + + +--- + +# Assignment 2 + +--- + +# Next session, we'll discuss: + +- More matplotlib! + diff --git a/03_instructional_team/markdown_slides/images/fig_axes.png b/03_instructional_team/markdown_slides/images/fig_axes.png new file mode 100644 index 000000000..aae0c18ec Binary files /dev/null and b/03_instructional_team/markdown_slides/images/fig_axes.png differ diff --git a/03_instructional_team/markdown_slides/images/fig_axes2.png b/03_instructional_team/markdown_slides/images/fig_axes2.png new file mode 100644 index 000000000..89e9dcedb Binary files /dev/null and b/03_instructional_team/markdown_slides/images/fig_axes2.png differ