$npx -y skills add chacosoldier/compabob --skill chart-tufteSelf-grade rubric for any quantitative chart, grounded in Edward Tufte's *Visual Display of Quantitative Information*. Run as a final pass inside visual-explainer (or any chart-emitting workflow) before showing the chart to the user. Strips chartjunk, checks lie factor, picks t
| 1 | # Chart Tufte |
| 2 | |
| 3 | A chart is good when it shows the data, helps the viewer reason about it, and does not lie. Tufte spent a career formalising this. This skill collapses his principles into a self-grade pass that runs on any chart the assistant is about to emit. |
| 4 | |
| 5 | **Read [references/vdqi-catalogue.md](references/vdqi-catalogue.md) first** when grading. It holds the named-failures library (NYT MPG 14.8, TIME barrel 59.4, etc.) and the named-exemplars library (Minard, Marey, Playfair, Snow). The catalogue is what makes assessment diagnostic instead of generic. |
| 6 | |
| 7 | ## When to invoke |
| 8 | |
| 9 | - **Automatically** — as the final step inside `visual-explainer` whenever the output is a *quantitative* chart (bar, line, scatter, area, dot, range-frame). Skip for diagrams (architecture, sequence, flow); those are different beasts. |
| 10 | - **Explicitly** — `/chart-tufte <chart-spec>` to score a chart produced elsewhere. |
| 11 | |
| 12 | ## The rubric (run before emitting) |
| 13 | |
| 14 | Score each on 0-10. Stop and revise if any score drops below 5. |
| 15 | |
| 16 | 1. **Data-ink ratio** — does every pixel of ink represent data? Borders, gridlines, redundant legends are non-data ink. Target: tend toward 1.0; typical for default-styled charts is 0.1-0.2 (VDQI p.136). |
| 17 | 2. **Lie factor** — `(visual change %) / (data change %)`. Acceptable range 0.95-1.05. Cite a VDQI named failure if it is worse: TIME's barrel chart hit 59.4, NYT's MPG hit 14.8. |
| 18 | 3. **Data density** — numbers per square inch. Below 0.15 is overwrought (a single bar showing one number is the canonical sin). High-density alternatives: small multiples, range-frame scatters, tables. |
| 19 | 4. **Chartjunk count** — does the chart contain any of the four named species? |
| 20 | - **Moiré** — vibrating cross-hatch patterns. |
| 21 | - **The dreaded grid** — gridlines drawn darker than the data. |
| 22 | - **The duck** — visual gimmick that overwhelms the data (3D pies, gradient-shaded bars). |
| 23 | - **Decoration** — clip art, icons, mascots in the chart frame. |
| 24 | Each chartjunk species costs points. |
| 25 | 5. **Genre fit** — is this the right *shape* for this data? |
| 26 | - ≤20 numbers → table, not chart |
| 27 | - Many series → small multiples (one panel per series) |
| 28 | - 2 quantitative variables → range-frame scatter (axis only spans data min-max) |
| 29 | - Distribution → quartile plot, not bar of mean |
| 30 | - Time series → thin line + direct endpoint labels, no legend |
| 31 | 6. **Dimensionality discipline** — does the chart use more dimensions than the data has? A 3D pie chart on 1D data is dishonest by construction. Penalise. |
| 32 | 7. **Direct labelling** — are series labelled at their endpoint or inline, not via a separate legend? Legends force the reader's eye to bounce. |
| 33 | 8. **Range-frame discipline** — does the axis span only the data range, not 0 to some arbitrary max? |
| 34 | 9. **Comparability** — if multiple panels: same y-scale where comparison matters; different scales only when local shape is the question. |
| 35 | |
| 36 | ## Remedies (when the rubric flags problems) |
| 37 | |
| 38 | - **B1 — fix lie factor**: redraw with proportional scaling. State the new lie factor in the chart caption. |
| 39 | - **B2 — erase non-data ink**: remove borders, drop gridlines, kill the legend if direct labelling fits. |
| 40 | - **B3 — increase data density**: switch to small multiples if you have ≥3 panels of comparable data. |
| 41 | - **B4 — pick the right genre** (see C1-C10 below). |
| 42 | - **B5 — name the failure**: if the chart resembles a VDQI named failure (NYT MPG 14.8, TIME barrel 59.4, LA Times shrinking-doctor 2.8, USA Today 3D bar chart, Playfair's wheat decline), say so before showing. |
| 43 | - **B6 — fix dimensionality**: 1D data → 1D chart; never 3D unless the third dimension is *in* the data. |
| 44 | - **B7 — deflate currency over time**: if plotting dollars across years, deflate to a common year (state which) before plotting. Failing to do this is a silent lie factor. |
| 45 | |
| 46 | ## Genre playbook (C1-C10) |
| 47 | |
| 48 | - **C1 — quartile plot** for distributions (5-number summary, no whiskers gimmick). |
| 49 | - **C2 — range-frame scatter** for two quantitative variables (axes span data range only). |
| 50 | - **C3 — dot-dash marginals** on a range frame to show density on each axis. |
| 51 | - **C4 — paired bars** for two-group comparison on one categorical axis. |
| 52 | - **C5 — small multiples** for many series (1 panel per series, same x-axis, often same y-axis). |
| 53 | - **C6 — sparkline** for inline time series at word-scale. |
| 54 | - **C7 — slopegraph** for before/after comparison across many categories. |
| 55 | - **C8 — stem-and-leaf table** when the goal is the actual numbers, not the shape. |
| 56 | - **C9 — table** when ≤20 numbers and structure matters. |
| 57 | - **C10 — thin line chart** for time series, direct endpoint label, no legend, no gridlines. |
| 58 | |
| 59 | ## Exemplars to emulat |