Appendix A — The kernel card

The whole taught vocabulary, on one page. This card is extracted live from The kernel as the book builds, so it cannot drift from the chapter that owns it.

Kind The words
Tables data query
Marks point line area bar step interval box ribbon text path rule zone surface
Channels x y z color size shape pattern opacity group label play
Transforms bin smooth count density proportion sum mean median max min range confidence bounds partition, and the three that resolve collisions, dodge stack jitter
Operators + layers, * derives, | and / arrange
Scales linear log time category order
Spaces flat space polar nest map
Settings style theme palette
Labels title x_label y_label z_label
Facets facet
Selections brush

The minimum sentence, a table, a mark, and the mark’s required positions:

data(table) + mark + x(column) + y(column)

Reading order, every sentence reads left to right as data, mark, positions, refinements. A channel written before any mark is shared by all layers; written after a mark, it belongs to that mark alone. Each later data() applies to the next mark.

Deriving, * puts a transform on a mark, and the mark is always on the left. Two transforms are written in the order they happen: bar * bin * mean cuts the axis into bands, then averages inside each.

Grouping, * binds tightest, then +, then |, so a sentence needs no parentheses: data(t) + bar * bin + x(a) | facet(g) derives the mark, builds the plot, then splits it.

When it refuses, the message names the rule and the fix. Illegal means the grammar forbids it: rewrite. Unsupported means the engine cannot draw it yet: another atom, or patience. A warning means a default was chosen: confirm it is what you meant.