Hadley Wickham, creator of `ggplot2` and `tidyverse`, ["A Layered Grammar of Graphics"](http://vita.had.co.nz/papers/layered-grammar.pdf).
Key Idea: move beyond pre-defined composites like "scatter plot" and "bar chart" into a composable grammar from which we can construct a wide variety of visualizations.
---
## Wickham's Components:
1. data and aesthetic mappings,
2. one or more layers, each with
- a geometric object (line, point, etc.)
- (optional) statistical transformation
- (optional) position adjustment
3. one scale per aesthetic mapping (color, size, etc.)
4. a coordinate system
5. facet specification
---
## Types of Data
### **N** - Nominal
"strings" with no **order** (alphabetical does not count)
Species
States
Countries
### **O** - Ordered
- Grades: A, B, C, D, E, F
- Rankings: 1st, 2nd, 3rd
---
## Types of Data (Quantitative)
### **Q** - Interval (arbitrary zero)
- Dates (1 CE, Jan 1 1970, or...)
- Location (lat, lon)
Only differences matter, can't compare ratios.
_(What is 2024 / 1990?)_
### **T**emporal
Some systems (like Altair) will also offer this option specifically for dates and times.
It also is very flexible in output formats, which will be useful if you want to modify your graphics or make them interactive.
Altair is built on top of **Vega-Lite**.
Vega-Lite is a system that represents graphics in a JSON schema, and a set of tools that convert these JSON representations to images or interactive graphics.