Skip to content

About

CTZN Viz has two aims. The first is to show data on subjects we want to understand: surveys, election returns, campaign-finance records, mortality statistics and eviction filings. Each figure makes one claim, and gives you the control that would show it is wrong if it were.

The second is to build reusable chart and map components in TypeScript that other projects can install. Every figure on the site is drawn with them, so a figure is also a working test of the components it uses.

Who makes it

How to read a figure

Every figure page has the same parts. The title states the finding and the line under it states the question. The chart comes next, with whatever controls let you test the finding: a date you can move, a weighting you can switch, counties you can select.

Below the chart, Reading notes say what the figure cannot show: who is missing, what was estimated rather than observed, and which comparisons the data will not support. Source & method links the dataset and records how the numbers were captured.

Most figures describe places or groups, not individuals, and associations, not causes. The reading notes say so where it matters.

Subjects

Built with

Charts

TanStack Chartsv1
Draws nearly every chart: the marks, axes, scales and interaction.
D3v4
Scales, shapes, number formats and map projections, used module by module.
Canvas 2D
For clouds of thousands of points, with a d3-quadtree for hover.

Maps

MapLibre GL JSv6
The zoomable WebGL maps.
PMTilesv4
Serves a national map's tiles from one static file, with no tile server.
TopoJSONv3
County and state boundaries for the drawn (SVG) maps.

Site

Next.jsv16
Pages, routing and caching; most pages are prerendered.
Reactv19
Every chart and control is a component.
TypeScriptv5
Throughout.
Tailwind CSSv4
Styling, on top of the site's own colour tokens.
Geist and Instrument Serif
Text and headings.
Lucidev1
Icons.

Publishing

shadcn registryv4
Lets other projects install a chart with npx shadcn add.
Playwrightv1
Captures the gallery's thumbnails from the live figures.
Vercel
Hosting.

Using the charts

The charts and maps are also a component library that other ctzn.pub projects install. The component documentation covers the design system, every chart form and how to install them.