token-charts
Everything behind
Fifty-five billion tokens:
the scripts that walk the Claude Code transcripts, the aggregated data they
produce, and the Vega-Lite specs that turn it into the charts. Each spec
reads its sibling .data.json, so it will render as-is in the
Vega editor.
The scripts read and write in the working directory, and the intermediates
are large, so run them somewhere else: copy the .py files to a
scratch directory, run them in the order below, and copy the resulting
.vl.json and .data.json back here.
Scripts
- scan_daily.py — walk every transcript in ~/claude-logs and ~/zed-logs, deduplicate on the assistant message id, emit one row per API response
- build_data.py — aggregate those rows by day, by model and by hour
- build_charts.py — the calendar heatmap, the per-model ridgeline, the cumulative panels and the diurnal profile
- build_cost_charts.py — the per-model and per-category cost charts
- build_project_chart.py — the per-project ridgeline, public repositories only
- scope.py — what the charts count (measured responses, priced models) and what each token costs
- chart_style.py — the config, colours and plot widths all the charts share, so they render to one width and one type size
- render_svgs.py — render each spec to the static SVG the post embeds, linking the labels of the public repositories
Specs and data