Grammar of Graphics

Definition

Grammar of graphics describes charts as composable parts. Select data and statistical transformations, map variables to visual properties, and realize the chart with marks, scales and coordinates.

Core rule: Specify the rows, aggregation, mapping and units for the question, then choose marks and panels.

Imagine a city with three library branches. At the weekly meeting, the operations lead puts up a bar chart, and the East branch towers over the other two for waiting time. Everybody looks at the East branch manager.

You can see which bar is tallest from across the room. But can the chart tell you that people waited longer at East?

The Grammar of Graphics breaks a statistical chart into pieces you can put together and check separately. We'll take that chart apart with the manager, then see where the method helps and what decisions it leaves to you.

How it works

The manager pulls up the records rather than arguing about the bar. Each row is one reader's wait in minutes. Branches go along the horizontal axis, and the height of a bar represents waiting. The question is what happened to those minutes on their way into a bar.

The tool used its default and added every reader's waiting time for the week. East gets the most visitors of the three, so its total is high. More people can push the bar up even if the wait per person stays the same.

  1. 01 · Specify data and transformation State the unit of observation and grouping or aggregation.
  2. 02 · Define the mapping Assign fields to position, color and other properties.
  3. +1 more mechanism steps & animation in the app

When it fails & limits

Taking a chart apart tells you how it was made. You still have to decide how useful and readable the result is.

✦ Unlock full lesson in ConceptFlow

Unlock the full Grammar of Graphics lesson in ConceptFlow

You’ve read the core idea and opening case. Get the ConceptFlow app to continue through the full breakdown, failure modes, 5-minute audio lesson, and decision practice.

  • ▸5-minute English & Mandarin audio lesson
  • ▸5 more deep-dive case & mechanism insights
  • ▸All 5 failure boundaries & counter-examples
  • ▸4-point decision checklist + 6-step practice

Tap a store button on mobile, or scan with your phone camera on desktop.