Scaffold Chart Sins site with Astro + build-time Vega-Lite

Set up the static-site tech stack: Astro 5 with Markdown content
collections, Vega-Lite specs rendered to static SVG at build time
(zero client JS), plain scoped CSS, and a GitHub Pages deploy workflow.

Includes three sample sins (truncated y-axis, dual-axis deception,
pie chart overload), each with a bad and fixed chart spec, plus a
gallery index and per-sin detail pages.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XPEvmMbac2fCvKXpQcovj8
This commit is contained in:
Claude
2026-08-05 11:57:52 +00:00
commit 2e17f8fa59
23 changed files with 978 additions and 0 deletions
+30
View File
@@ -0,0 +1,30 @@
---
title: "The Dual-Axis Deception"
summary: "Two unrelated series on two independent axes, engineered to look correlated."
category: "False Relationships"
severity: 5
tags: ["dual axis", "correlation", "line chart"]
badChart: "dual-axis-bad"
fixedChart: "dual-axis-fixed"
date: 2026-08-05
---
## The sin
Put two series on the same plot with two independent y-axes and you can make
*anything* look correlated. Slide the scales until the lines overlap and the
reader's brain does the rest: "these move together, so one must cause the other."
## Why it deceives
With independent axes, the vertical position of each line is arbitrary — you
chose it. Overlapping lines imply a relationship that exists only because you
tuned two scales to coincide. Ice cream sales and shark attacks both rise in
summer; neither causes the other. The shared season is the hidden variable.
## The repentance
Don't force two series into one coordinate space just to imply a link. Show them
in **separate, stacked panels** with honest zero-based scales. If you truly want
to argue they move together, plot one **against** the other (a scatter plot) and
let the reader judge the relationship — don't manufacture it with axis scaling.
+31
View File
@@ -0,0 +1,31 @@
---
title: "Pie Chart Overload"
summary: "Eight near-identical slices no human eye can rank. A bar chart was right there."
category: "Chart-Type Abuse"
severity: 3
tags: ["pie chart", "part-to-whole", "comparison"]
badChart: "pie-overload-bad"
fixedChart: "pie-overload-fixed"
date: 2026-08-05
---
## The sin
The pie chart asks the reader to compare **angles** — something people are
genuinely bad at. One or two slices, fine. But eight slices, several of them
within a percentage point of each other? Nobody can tell whether Firefox beats
Samsung by eyeballing two thin wedges on opposite sides of the circle.
## Why it deceives
Angle and area are hard to judge precisely, and slices scattered around the
circle can't be lined up against a common baseline. The small categories blur
into an indistinguishable fringe, and the ranking — usually the whole point —
becomes guesswork.
## The repentance
Use a **sorted horizontal bar chart**. Every value shares one baseline, the
ordering is explicit, and long labels sit comfortably beside their bars. Reserve
the pie for the rare case of two or three parts of an obvious whole — and even
then, a bar chart rarely does worse.
+30
View File
@@ -0,0 +1,30 @@
---
title: "The Truncated Y-Axis"
summary: "Chopping the baseline off a bar chart to make small differences look enormous."
category: "Misleading Scales"
severity: 4
tags: ["bar chart", "axis", "exaggeration"]
badChart: "truncated-axis-bad"
fixedChart: "truncated-axis-fixed"
date: 2026-08-05
---
## The sin
Bar charts encode value with **length**. When you start the y-axis somewhere
above zero, the bars no longer represent their true magnitudes — a jump from 92
to 98 (a ~6% change) can be drawn to look like a chart-topping surge. The reader
compares bar heights and walks away with a wildly inflated sense of the trend.
## Why it deceives
The eye reads the ratio of bar lengths, not the axis labels. Truncating the
baseline breaks the contract between "twice as tall" and "twice as much." It is
the single most common way an honest-looking bar chart tells a lie.
## The repentance
Start bar charts at zero. Always. If the interesting variation is genuinely
small and a zero baseline flattens it, that is a signal to switch encodings —
use a **line chart** or a **dot plot**, where position (not length) carries the
meaning and a non-zero range is legitimate.