← Type scale and size hierarchy

type-02-scale.A

Life Expectancy at Birth vs. World BaselineBaseline (world): 73.48 years (life expectancy at birth) — fetched 2026-07-26-20-15-10-50+5+10Δ from world baseline (years)Japan+10.56 (84.04)France+9.5 (82.98)Germany+7.31 (80.79)United States+5.41 (78.89)China+4.54 (78.02)Brazil+2.54 (76.02)Mexico+1.78 (75.26)India-1.25 (72.23)Egypt, Arab Rep.-1.67 (71.81)Indonesia-2.19 (71.29)South Africa-7.17 (66.31)Nigeria-18.85 (54.63)
Arm
A · Claude default
Method
clean subagent, naive prompt
Mode
refine — the treated arms ran on the default arm's output, so the only difference is the lever
Fixture
table12
Runs
3 · shipped: median
Generated
2026-07-26

Verbatim prompt

Here is a dataset:

{
  "name": "table12",
  "source": "https://api.worldbank.org/v2/country/USA;JPN;DEU;BRA;IND;NGA;CHN;MEX;ZAF;FRA;IDN;EGY/indicator/SP.DYN.LE00.IN?format=json&mrnev=1 (FALLBACK: primary lichess explorer failed with \"lichess 401\"; using World Bank life expectancy at birth, 12 countries, baseline = world value)",
  "fetched": "2026-07-26",
  "baseline": 73.48,
  "unit": "years (life expectancy at birth)",
  "rows": [
    {
      "label": "Brazil",
      "value": 76.02,
      "delta": 2.54
    },
    {
      "label": "China",
      "value": 78.02,
      "delta": 4.54
    },
    {
      "label": "Germany",
      "value": 80.79,
      "delta": 7.31
    },
    {
      "label": "Egypt, Arab Rep.",
      "value": 71.81,
      "delta": -1.67
    },
    {
      "label": "France",
      "value": 82.98,
      "delta": 9.5
    },
    {
      "label": "Indonesia",
      "value": 71.29,
      "delta": -2.19
    },
    {
      "label": "India",
      "value": 72.23,
      "delta": -1.25
    },
    {
      "label": "Japan",
      "value": 84.04,
      "delta": 10.56
    },
    {
      "label": "Mexico",
      "value": 75.26,
      "delta": 1.78
    },
    {
      "label": "Nigeria",
      "value": 54.63,
      "delta": -18.85
    },
    {
      "label": "United States",
      "value": 78.89,
      "delta": 5.41
    },
    {
      "label": "South Africa",
      "value": 66.31,
      "delta": -7.17
    }
  ]
}

It is 12 countries' life expectancy at birth in years, and each country's difference from the World Bank world baseline of 73.48 years.

Write a chart of it as an ES module with exactly this shape:

export const meta = { fixture: "table12", width: 640, height: 400 };
export function render(svg, data) { /* mutate the passed <svg> element in place */ }

`data` is the object above. You get a real <svg> element in a jsdom document —
use svg.ownerDocument and createElementNS, or a d3 selection over it. No
network. No Date.now() or Math.random(). Return only the module code.