Error Bars
Source: Data Visualisation Catalogue - Error Bars
Why This Belongs In The Compiler Gallery
Error bars are a direct test of statistical transform ownership. The visible marks are simple line caps and point glyphs, but the compiler needs to derive group means and uncertainty intervals from raw observations instead of receiving precomputed lower/upper values.
Data Contract
Each raw row is one observation belonging to a group.
| Field | Type | Purpose |
|---|---|---|
segment | categorical | Group on the x axis. |
value | quantitative | Raw measured value. |
mean | quantitative, derived | Group average. |
lower | quantitative, derived | Lower error interval bound. |
upper | quantitative, derived | Upper error interval bound. |
error | quantitative, derived | Interval half-width. |
Expected Visual
The chart shows one mean point per group with a vertical interval and horizontal caps. The first gallery version uses a 95 percent confidence-style interval from the new errorInterval transform.
Compiler Mapping
| Compiler part | Mapping |
|---|---|
| Data source | observations raw table and derived error-intervals table. |
| Transform | errorInterval groups rows and computes mean, standard deviation, standard error, and interval bounds. |
| Scales | x: band(segment), y: linear(value). |
| Layers | line stems/caps and point mean markers. |
| Guides | Generated x/y axes and y gridlines. |
Faithfulness Notes
The core statistical interval is compiler-owned. Remaining work is policy breadth: asymmetric intervals, externally supplied confidence bounds, and richer statistical labels.