5  Data Visual Design

Above all else show the data.

Edward Tufte (a pioneer in data visualization, professor at Yale)

5.1 A Framework for Visualization

The framework of Tamara Munzner, a computer scientist at the University of British Columbia, breaks the design of a visualization into a sequence of questions (Munzner 2014):

  • Actions of data visualization \(\rightarrow\) users’ actions toward visualization
  • Target of data visualization \(\rightarrow\) which part of the data users focus on
  • The choice of visualization idioms \(\rightarrow\) which form best presents it
  • Marks and channels \(\rightarrow\) how to encode them visually
  • Expressiveness vs effectiveness \(\rightarrow\) key standards for good visualization
  • Elements of a single graph \(\rightarrow\) components in a graph
  • User experience and organization \(\rightarrow\) how people will use and understand the visualization
  • Graphic interaction \(\rightarrow\) how people can interact with the visualization

It represents a thinking flow: from understanding the goal of visualization, to selecting the right form, to ensuring clarity, usability, and interaction.

5.1.1 A Running Example

Throughout this lecture and lab, we will use a dataset on transit agencies. Most transit agencies, including the four largest ones in the Puget Sound region, King County Metro (KCM), Sound Transit (ST), Community Transit (CT), and Pierce Transit (PT), report their yearly operations to the Federal Transit Administration’s National Transit Database (NTD). Our subset has 89 rows, one for each agency, mode, type of service, and year from 2022 to 2025.

Attribute Type Example: Sound Transit, 2025
Agency Categorical Sound Transit
Mode Categorical Light rail, commuter rail, commuter bus, …
Type of service Categorical Run by the agency, or by a contractor
Year Ordinal 2025
Fare revenue Quantitative $74.6 million
Operating expenses Quantitative $704.7 million
Unlinked passenger trips Quantitative 50.9 million boardings
Vehicle revenue hours Quantitative 1.23 million hours of service
Table 5.1: The attributes of the Puget Sound transit data. Source: National Transit Database.

5.2 Actions: Why Are They Looking?

Munzner describes three levels of actions for different user purposes: analyze (high level), search (middle level), and query (low level). Much of the content in the following sections comes from Munzner (2014).

Munzner, Tamara. 2014. Visualization Analysis and Design. A K Peters/CRC Press. https://doi.org/10.1201/b17511.

Analyze (high level). From the perspective of users, why are they looking at the visualization?

  • Consuming a visualization rather than producing one
    • Discover: explore data
    • Present: show what is already known to others (explain)
    • Enjoy: casual and social
  • Producing new information
    • Annotate: take notes and annotate key points
    • Record: record the discovery and analysis process
    • Derive: derive new variables and produce new charts
Figure 5.1: Actions at the analyze level.

Search (middle level). Users are trying to find a known or unknown item in the visualization. Because users attempt to search for something, interaction and navigation are important to help them find the right places.

  • Lookup: for example, a word in a dictionary in alphabetical order
  • Locate: for example, keys in your house, or a node in a network
  • Browse: for example, books in a bookstore
  • Explore: for example, finding a cool neighborhood in a new city

Query (low level). Users are trying to find out about the detailed characteristics of items: identify, compare, and summarize. How much of the data matters:

  • One: identify
  • Some: compare
  • All: summarize
Figure 5.3: Actions at the query level.

A task usually combines one action from each level. In the web version of these notes, picking one in each column gives an example of that task on the Puget Sound transit data.

Analyze (high level) Search (middle level) Query (low level)
Discover: find something new Lookup: know what and where Identify: one item
Present: show what is known Locate: know what, not where Compare: some items
Enjoy: look out of curiosity Browse: know where, not what Summarize: all items
Annotate: add notes to a chart Explore: know neither
Record: save what was found
Derive: compute new attributes
Table 5.2: Munzner’s actions at three levels; the examples in the web version were generated with Claude Opus 5.5.

5.3 Targets: What Will Users Look At?

A target describes which part of the data users are examining, and this depends on the data type. Almost any dataset can be decomposed into three parts: the dataset as a whole (all data), its items, and its attributes.

Figure 5.4: Targets: all data, attributes, network data, and spatial data.

Example 5.1 Figure 5.5 looks at the transit data as a whole: a trend over the years, the points that break a pattern, and a group that stands apart. Figure 5.6 looks at its attributes, first one alone and then two together.

Figure 5.5: All data as the target, all 89 rows. Left: each service’s trips as an index (its 2022 = 100) as thin grey lines, all services together as the thick line. Right: cost per trip against trips per revenue hour, with the fitted log-log line. Source: National Transit Database.
Figure 5.6: Attributes as the target, all 89 rows. Left: one attribute, cost per trip, its distribution and two extremes. Right: two attributes, trips and operating expenses, and their correlation. Source: National Transit Database.

5.4 Idioms: How to Visualize?

The types of the variables narrow down the charts that fit; From Data to Viz offers a decision tree for choosing among them.

Figure 5.7: Example of choosing a chart from the types of the variables. Source: From Data to Viz.

The idiom is chosen from the action and the target. Four families of idioms answer four questions:

  • Encode asks how to convert data to visual elements, including positions of marks and their visual channels (more in the next section):
    • How to arrange the items (express, separate, order, align)?
    • How to map attributes to the other channels (size, value, texture, color, orientation, shape)?
  • Facet (juxtapose, partition, superimpose): how to show multiple views, especially to compare?
  • Reduce (filter, aggregate, embed): how to simplify complex data?
  • Manipulate (change, select, navigate): how can users interact with the visualization?
Figure 5.8: Encode: arrange (express, separate, order, align) and use.

Example 5.2 The following figure puts the facet, reduce, and manipulate idioms to work on the monthly ridership of the four transit agencies, 2015 to 2025.

Figure 5.9: Monthly trips and revenue hours of the four agencies by mode, 2015-2025, under the idioms of this section. Source: National Transit Database.

5.5 Marks and Channels

  • Marks represent items or links.
  • Channels (also called visual variables) control the appearance of marks based on attributes.

Marks as items are basic geometric elements of a chart: points (0D), lines (1D), and areas (2D). A 3D mark, volume, is rarely used.

Figure 5.10: Marks as items: points, lines, and areas.

Marks as links show containment or connection:

Channels include position, color, size (length, area, volume), shape, and tilt.

Figure 5.12: Channels: position, color, size, shape, and tilt.

5.6 Expressiveness: Matching Channel to Data Type

In Mackinlay’s terms, a visualization is expressive if it shows all the facts in the data, and only those facts. Channels differ in how accurately people read them, and the ranking depends on the type of data (Figure 5.13).

Figure 5.13: Ranking of perceptual tasks for quantitative, ordinal, and nominal data. The tasks in the gray boxes are not relevant to that type of data. Source: modified from Mackinlay (1986).
Mackinlay, Jock. 1986. “Automating the Design of Graphical Presentations of Relational Information.” ACM Transactions on Graphics 5 (2): 110–41. https://doi.org/10.1145/22949.22950.

Example 5.3 Figure 5.14 adds two attributes to a scatter plot: the trips each service carried in the year, and its mode group. The two panels encode them differently.

Figure 5.14: Cost per trip against trips per revenue hour in 2025, with trips a year and mode group. Source: National Transit Database.

5.7 Effectiveness: Choosing Channels by Importance

In short, effectiveness means giving the most accurate channel (at the top of the list) to the most important variable. When a weaker channel cannot be avoided, print the numbers on the marks.

Figure 5.15: The values 2 and 8 drawn with each channel, from the most accurately read (top) to the least (bottom).

Example 5.4 The figure shows where the riders are: one point for each agency and mode, its shade the number of trips in 2025. Can you still tell which variable matters most here?

Figure 5.16: Trips in 2025 by agency and mode: one point for each pair, darker for more trips. Source: National Transit Database.

Example 5.5 They Made a Terrible Visualization: The Alabama Department of Labor charted weekly unemployment insurance claims as packed bubbles. The numbers are encoded as area and the dates as color hue, two channels near the bottom of the ranking.

Figure 5.17: Weekly unemployment insurance claims as packed bubbles. Source: Alabama Department of Labor; From Data to Viz.

Pairing position with position (a line or area chart), position with length (a bar chart), or position with area (a bubble scatter plot) would read far better (Figure 5.18).

Figure 5.18: The channels of the claims chart and three better pairings. Source: From Data to Viz.

5.7.1 Stevens’ Psychophysical Power Law

Stevens’ psychophysical power law explains part of the ranking: the perceived sensation \(S\) grows as a power of the physical intensity \(I\), and \(S = I^{N}\). So a channel with \(N = 1\) is perceived in proportion, and one with \(N < 1\) or \(N > 1\) is under- or overestimated.

Figure 5.19: Perceived sensation against physical intensity: electric shock (N = 3.5) and saturation (1.7) are overestimated, length (1) is perceived in proportion, and area (0.7), depth (0.67), and brightness (0.5) are underestimated. Source: Munzner (2014).
Munzner, Tamara. 2014. Visualization Analysis and Design. A K Peters/CRC Press. https://doi.org/10.1201/b17511.

Figure 5.20 draws three values in the ratio 1 : 2 : 5 with four of these channels.

Figure 5.20: Three values in the ratio 1 : 2 : 5, drawn by length, area, brightness, and saturation, with the ratio Stevens’ law predicts a reader perceives, \(v^N\). Electric shock and depth are left out: neither can be drawn on a flat page.

5.7.2 Color

Color does three different jobs, and each needs its own kind of palette:

  • A sequential palette runs from light to dark for an ordered variable from low to high.
  • A diverging palette runs from one hue through a light neutral to another hue, for a variable with a meaningful midpoint, such as a change that can be negative or positive.
  • A qualitative palette uses clearly different hues of similar lightness for categories with no order.

ColorBrewer, designed by Cynthia Brewer, offers tested palettes of all three kinds for maps.

Figure 5.21: Three kinds of palette: sequential, diverging, and qualitative.

5.7.3 Data-Ink Ratio

Data-ink ratio = data ink / total ink used in the graphic

= the proportion of a graphic’s ink devoted to the non-redundant display of data

= 1.0 - the proportion of the graphic that can be erased.

Figure 5.22: Removing the background and labeling the bars directly raises the data-ink ratio. Source: Darkhorse Analytics.

Chartjunk is not always harmful. In some cases, it may even increase the memorability and engagement of a visualization.

Figure 5.23: The same data as an embellished chart and as a plain pie chart. Source: Bateman et al. (2010).
Bateman, Scott, Regan L. Mandryk, Carl Gutwin, Aaron Genest, David McDine, and Christopher Brooks. 2010. “Useful Junk? The Effects of Visual Embellishment on Comprehension and Memorability of Charts.” Proceedings of the SIGCHI Conference on Human Factors in Computing Systems, 2573–82. https://doi.org/10.1145/1753326.1753716.

Less is more: Tufte’s rule is to erase ink that shows nothing: heavy grid lines, frames, shadows, three-dimensional effects, and legends that could be direct labels.

Figure 5.24: Remove to improve the data-ink ratio. Source: Darkhorse Analytics.

5.8 Elements of a Single Graph

A single graph should have a title, a subtitle, encodings, annotations, axes, and a legend. A map should also include a scale bar, a north arrow, and its projection or coordinate system.

Washington State monthly apartment rent changes since COVID-19, in four panels by number of bedrooms, one line per quality level. Data: RentHub, 2019-2022.

Figure 5.25: Washington State monthly apartment rent changes since COVID-19. In the HTML version, the element under the pointer is outlined and named below the chart. Data: RentHub, 2019-2022.

5.9 User Experience and Organization

5.9.1 User Experience

What motivates us at a deep level are the things that satisfy basic psychological needs:

  • Autonomy: structure beats no structure; make it easy to navigate.
  • Relatedness: no need to be too creative; keep content relevant to the audience.
  • Competence: select information and use guidance to make the visualization intuitive and easy to understand. It is not an IQ test!

5.9.2 Unity

Unity is the application of methods that ensure that elements in the design (color, font, shape) appear to “go together” (Figure 5.26).

Figure 5.26: A dashboard on Beatles albums, all in black and white. Author: Mike Moore. Source: Tableau Public.

5.9.3 Hierarchy

Hierarchy is the application of design methods to indicate importance and “flow” within the visual, through size and placement.

Figure 5.27: A dashboard with six levels. Source: Tableau Public.

5.9.4 Size

The larger element is read first.

Figure 5.28: Size, before and after. Source: Visme.

5.9.5 Color Contrast

A contrasting color picks one element out of many.

Figure 5.29: Color contrast, before and after. Source: Visme.

5.9.6 Using Font to Organize Design

The size and weight of the type set the order in which text is read.

Figure 5.30: A business card, before and after: the name set large and bold above the contact details. Source: Visme.

5.9.7 Balance and Alignment

Balance and alignment are used to create harmonious visuals that do not distract from the message being communicated.

Figure 5.31: Three calendar heat maps of crime in Chicago. Author: George Goczynski. Source: Tableau Public.

5.9.8 Grouping and Spacing

Grouping and spacing can be used to associate similar elements and provide a narrative or visual flow within the visualization.

Figure 5.32: Fifty years of crime in the United States, one row per type of crime. Author: Shine Pulikathara. Source: Tableau Public.

5.10 Consume and Practice

The end of the principles is the start of practice: looking at many good visualizations and making your own matter more than any list of rules.

Figure 5.33: Four collections of data visualization examples and guides.

5.11 Critique and Deceptive Visualization

Visualization is a way to communicate. People can also use it to lie, distort the truth, or mislead, intentionally or unintentionally. What makes bad figures bad?

  • Aesthetic: tacky, tasteless, or hodgepodge design.
  • Substantive: the way the data are used is subpar, or the data themselves are flawed; a wrong interpretation.
  • Perceptual: good data and aesthetics, but the graph is confusing or misleading.
Figure 5.34: Gun deaths in Florida with an inverted y-axis (left) and the same chart flipped (right). Source: The Society Pages.

5.11.1 Iraq’s Two Stories

The same data can tell opposite stories through design choices: the title, the color, and the orientation of the bars. First, the title tells readers how to read the chart: three words, “Iraq’s Bloody Toll,” set the author’s agenda. Second, the bars hang downward. Finally, they are red, so the chart looks like blood dripping down the page.

Figure 5.35: The same data as “Iraq’s Bloody Toll” and as “Iraq: Deaths on the Decline.” Source: InfoWorld.