{"slug": "datasette-charts-0-1a0-sql-aggregates-across-every-row", "title": "datasette-charts 0.1a0: SQL Aggregates Across Every Row", "summary": "Simon Willison released datasette-charts 0.1a0 on November 23, 2026, a Datasette plugin that compiles GROUP BY aggregates across full result sets instead of the roughly 100 rows visible on a paginated HTML page, fixing a limitation he had considered for over a year. The plugin works on any table or arbitrary SQL, fetches up to 5,000 aggregated points for D3 rendering, and was prototyped with Claude Fable 5.2 before shipping to PyPI the same day. Willison said the coding agent wrote the initial prototype but that he reviewed renders and iterated, and he advises pinning Datasette and plugin versions in production and auditing vendored JavaScript on upgrade.", "body_md": "**datasette-charts 0.1a0 fixes a long-standing Datasette limitation**: charts that silently ignored every row beyond the current HTML page. **Simon Willison** announced the plugin on **[November 23, 2026](https://simonwillison.net/2026/Nov/23/datasette-charts/?ref=explainx)** after a **Claude Fable 5.2** prototype session that graduated to a **`0.1a0`** PyPI release the same day. The plugin works on **any table** or **arbitrary SQL** inside **[Datasette](https://datasette.io/?ref=explainx)**, compiling **GROUP BY** aggregates across **millions of rows** before rendering **D3**-backed visuals.\n\n## TL;DR\n\n| Question | Answer | \n|---|---|\n| **Version** | **datasette-charts 0.1a0** (alpha) | \n| **Ship date** | **November 23, 2026** | \n| **Key fix** | Charts use **full result sets** , not paginated slices | \n| **SQL cap** | Aggregates return up to **5,000** rows for drawing | \n| **Try online** | **Datasette Lite** link in Willison's post | \n| **Libraries** | Vendored **D3** ,**Observable Plot** ,**topojson-client** | \n\nSQL funnel selecting rows for Datasette full-table chart aggregates\n\n## The pagination problem Willison solved\n\nDatasette publishes **SQLite** databases as explorable websites. Pagination keeps pages fast, but **visualization plugins inherited the page boundary**:\n\n- **`datasette-vega`** and peers charted**only visible rows** —often**~100** entries.\n- Analysts exported **CSV** to**LibreOffice** or**Observable** to see real totals.\n- **Public data journalists** risked misleading charts during breaking news.\n\nWillison had **[thought about the problem for over a year](https://simonwillison.net/2026/Nov/23/datasette-charts/?ref=explainx)**. On **Sunday** he **fired up Claude Fable 5.2**, built a prototype, and kept going until it became a **plugin**.\n\nThat story sits next to **[Datasette 1.0a43 security fixes](https://explainx.ai/blog/datasette-1-0a43-stored-query-advisory-streaming-2026)** from **November 15** and **[datasette-arrows streaming exports](https://explainx.ai/blog/datasette-arrows-apache-arrow-streaming-export-2026)**—three November moves toward **serious data publishing**.\n\n## How datasette-charts works under the hood\n\nWillison describes a **compile-to-SQL** pipeline:\n\n1. **Inspect** column types and row samples (with**sampling** on huge tables).\n2. **Heuristically suggest** chart types—thumbnails at the top are**real mini visualizations** , not icons.\n3. **Compile** the chosen chart to**SQL** using**GROUP BY** ,**time bucketing** , and**window functions** .\n4. **Fetch** up to**5,000** aggregated points—enough for responsive**D3** rendering.\n5. **Persist** UI state in the URL**fragment** for bookmarking.\n\nDatabase cylinder stack representing SQLite tables behind Datasette charts\n\nSampling matters: on **multi-million-row** tables, the plugin avoids scanning everything just to **guess** that a **histogram** fits. Once you pick a chart, the **aggregate query** still reflects the **full logical result** of your table or SQL string.\n\n## User experience: suggestions first, editor second\n\nWillison's screenshots show:\n\n- A row of **suggested chart thumbnails** computed from live data\n- Clicking a thumbnail opens the **full chart** plus**tuning controls**\n- A **manual builder** for power users who know they want a**scatter** or**bar** upfront\n\nFragment persistence matches **[Datasette's design philosophy](https://datasette.io/?ref=explainx)**—shareable, static-friendly URLs without a separate BI login.\n\n## Claude Fable's role (and limits)\n\nWillison is explicit: **Claude Fable 5.2** wrote the **initial prototype**. He reviewed renders, iterated, and shipped **`0.1a0`**. That is **[coding-agent craft](https://explainx.ai/blog/claude-code-commands-complete-reference-guide-2026)** applied to **maintainer-owned OSS**, not a drop-in replacement for **design judgment**.\n\nBuilders should still:\n\n- **Pin** Datasette and plugin versions in production\n- **Audit** vendored**JS** when upgrading\n- **Run****[Datasette's stored-query security patches](https://explainx.ai/blog/datasette-1-0a43-stored-query-advisory-streaming-2026)** before exposing new UI surfaces\n\n## Installation and compatibility\n\nTreat **`0.1a0`** as **alpha**:\n\n```\npip install datasette-charts==0.1a0\ndatasette install datasette-charts\n```\n\nRun against **Datasette 1.0a44+** (per PyPI) or **0.65.6+** so you inherit **November 2026 ACL fixes**. For **agent-facing** installs, see **[datasette-agent](https://explainx.ai/blog/datasette-1-0a43-stored-query-advisory-streaming-2026)** in the same release wave.\n\n**Datasette Lite** demo (linked from Willison's post) is the fastest **how to use datasette** path without a local Python venv.\n\n## How to install Datasette (context)\n\nIf **`how to install datasette`** is your starting point:\n\n```\npip install datasette\ndatasette serve database.db\n```\n\nAdd **datasette-charts** once the base app answers on **localhost**. For **browser-only** experiments, Willison's **November 17** post on running **Datasette in the browser with Pyodide** shows another surface area, though alpha plugins may lag behind desktop installs.\n\n## Comparison with other visualization paths\n\n| Tool | Full-table aggregates? | Best for | \n|---|---|---|\n| **datasette-charts 0.1a0** | **Yes** (SQL compile) | **SQLite publishers** | \n| **datasette-vega** | **No** (page-limited) | Quick inline Vega on small pages | \n| **Export + Observable** | **Yes** (manual) | One-off investigations | \n| **Hex / Metabase** | **Yes** | Paid BI teams | \n\n## What would make this production-grade\n\nWillison calls the release **the closest** he has gotten to **\"visualize with minimal direction\"**, but labels it **alpha**. Watch for:\n\n- **Stable chart type APIs** for plugin authors\n- **Access control** on expensive aggregate queries\n- **Caching** layers for public datasets under viral traffic\n\nLink **datasette-charts** announcements back here from any **newsroom** postmortem when you adopt it.\n\n## Chart types and heuristics (what Willison promises)\n\nWillison does not ship a exhaustive chart encyclopedia in the announcement, but the mechanics are consistent across **[Datasette map plugins](https://explainx.ai/blog/datasette-1-0a43-stored-query-advisory-streaming-2026)** and older **vega** work:\n\n- **Time series** appear when a**datetime** column dominates samples\n- **Category bars** appear when**low-cardinality strings** show up\n- **Geographic** plots lean on vendored**topojson-client** when lat/long columns exist\n\nThumbnails are **not** clipart—they are **real renders** on sampled data, so users trust suggestions before opening the editor. That reduces the **\"blank chart\"** paralysis reporters describe when opening generic BI tools during deadlines.\n\n## Performance and SQLite realities\n\nAggregates still hit **SQLite** on the server. **5,000** drawn points does not mean **5,000** scanned rows—it means the **compiled SQL** returned a bounded aggregate vector. On **multi-gigabyte** databases:\n\n- Expect **CPU spikes** the first time someone opens an expensive**time bucket** chart\n- Use **Datasette's permission model** so anonymous users cannot spam heavy**`GROUP BY`** queries\n- Consider **read-only replicas** if you publish**election** or**sports** datasets\n\nWillison's **sampling** step protects **suggestion** latency; operators should still add **indexes** on bucketed columns for production.\n\n## Building a newsroom workflow\n\nA practical **Monday** rollout for data journalists:\n\n1. Upgrade **Datasette** to**1.0a44+** for**datasette-charts** and**stored-query** ACL fixes\n2. Install **datasette-charts==0.1a0** on the staging instance\n3. Open the **Datasette Lite** demo and copy**fragment URLs** into Slack for editors\n4. Document which tables are **safe** for auto-charts (no hidden PII columns)\n\nPair with **[datasette-arrows](https://explainx.ai/blog/datasette-arrows-apache-arrow-streaming-export-2026)** when analysts need **Arrow** exports after they pick a chart shape in the UI.\n\n## Agent-assisted maintenance\n\nWillison used **Claude Fable** for the **first implementation burst**, not for ongoing releases. Teams experimenting with **[datasette-agent](https://explainx.ai/blog/datasette-1-0a43-stored-query-advisory-streaming-2026)** should still **human-review** SQL migrations—agents excel at **boilerplate** plugin files, not at guessing **schema constraints** on legacy government tables.\n\n## What people ask after seeing the announcement\n\n**Does datasette-charts replace datasette-vega?** Not automatically. **Vega** still fits when you already authored a spec. **datasette-charts** targets **discovery**—let the plugin propose charts, then export or embed fragments in stories.\n\n**How to install datasette plugins in Docker?** Bake **`pip install datasette-charts==0.1a0`** into your image alongside **Datasette 1.0a44+**, mount **SQLite** read-only, and front with **HTTPS** so fragment URLs survive sharing.\n\n**Will this work on Datasette Cloud?** Any hosted **Datasette** that allows custom plugins can ship it; verify **memory limits** on aggregate queries before enabling public **million-row** tables.\n\n**Does Claude Fable write insecure SQL?** The plugin issues **read-only aggregates** through Datasette's query layer, but **misconfigured permissions** still expose rows. Patch **stored-query ACLs** from **[November 15 advisory work](https://explainx.ai/blog/datasette-1-0a43-stored-query-advisory-streaming-2026)** before adding UI that encourages ad-hoc exploration.\n\n**Can I embed charts in newsletters?** Fragment URLs help, but email clients strip fragments—screenshot the rendered chart or host a **static export** for subscribers.\n\n## Looped transformers and visualization (why this week feels busy)\n\nWillison's **Fable** session lands the same week as **[GLM-5.4 Loop Transformer](https://explainx.ai/blog/glm-5-4-coding-plan-vision-50-percent-quota-boost-november-2026)** and **[Inkling looped MoE](https://explainx.ai/blog/atomic-engine-inkling-2-mini-3x-speed-memory-budget-november-2026)** speedups. Different problems—**charts versus tokens**—but the through-line is **agents shortening the path from idea to shipped OSS**.\n\n## Security checklist before you expose charts\n\nChart plugins increase **attack surface** because they encourage **ad-hoc SQL**. Before enabling **datasette-charts** on a public **`*.datasette.io`** or self-hosted domain:\n\n- Confirm **Datasette 1.0a44+** or**0.65.6** so**private stored queries** cannot leak titles\n- Disable **arbitrary SQL** for anonymous users if your threat model includes**scanner bots**\n- Log **slow queries** and set**statement timeouts** at the**SQLite** connection layer where possible\n- Review **CORS** and**CSRF** settings when embedding**fragments** in third-party CMS pages\n\nNone of that is unique to **datasette-charts**—it inherits Datasette's **permission** model—but the **lower friction** to chart means more people will click suggestions without reading the underlying **`GROUP BY`**.\n\n## Teaching journalists to read aggregate SQL\n\nWhen a reporter picks a **suggested bar chart**, show them the compiled **SQL** Datasette executed. Three lessons:\n\n1. **Filters matter** — a hidden`WHERE` on the table changes totals\n2. **Buckets mask outliers** —**time bucketing** can hide spikes unless you also chart raw events\n3. **Nulls disappear** —**`GROUP BY`** drops unset categories unless you**` coalesce`**\n\nThat training pairs with **[Datasette arrows streaming](https://explainx.ai/blog/datasette-arrows-apache-arrow-streaming-export-2026)** exports when they need to **pivot** in **Polars** after spotting a weird bucket.\n\n## Observability for operators\n\nMetrics worth tracking the week you enable the plugin:\n\n| Signal | Why | \n|---|---|\n| **p95 aggregate latency** | Spot expensive **`GROUP BY`** before viral traffic | \n| **Cache hit rate** | Datasette may cache queries; charts change access patterns | \n| **Error rate on fragments** | Broken fragments indicate schema drift | \n| **CPU per suggestion thumbnail** | Sampling should stay sub-second on big tables | \n\n## Long-term product bets Willison is signaling\n\nIn the announcement, Willison calls this release **the closest** he has gotten to automatic visualization. That signals future work on:\n\n- **Better time-zone aware bucketing** for news datasets\n- **Collaborative editing** without breaking fragment URLs\n- **Tighter agent hooks** so**[datasette-agent](https://explainx.ai/blog/datasette-1-0a43-stored-query-advisory-streaming-2026)** can propose charts in chat\n\nNone of those ship in **0.1a0**, but the **SQL-first** architecture is the substrate—charts are **views**, not **copies** of data.\n\n## Related on explainx.ai\n\n*Plugin version and release date match Simon Willison's November 23, 2026 announcement.*", "url": "https://wpnews.pro/news/datasette-charts-0-1a0-sql-aggregates-across-every-row", "canonical_source": "https://explainx.ai/blog/datasette-charts-0-1a0-sql-aggregates-claude-fable-november-2026?utm_source=rss&utm_medium=feed&utm_campaign=blog", "published_at": "2026-11-24 00:00:00+00:00", "updated_at": "2026-11-24 01:14:58.244555+00:00", "lang": "en", "topics": ["ai-tools", "ai-agents", "developer-tools", "generative-ai"], "entities": ["Simon Willison", "datasette-charts", "Datasette", "Claude Fable 5.2", "PyPI", "D3", "datasette-vega", "SQLite"], "also_reported_by": [], "takeaway": "datasette-charts 0.1a0 compiles chart selections into GROUP BY SQL over the full table or query and fetches up to 5,000 aggregated points, so charts no longer reflect only the ~100 rows of the current page.", "recommendation": null, "alternates": {"html": "https://wpnews.pro/news/datasette-charts-0-1a0-sql-aggregates-across-every-row", "markdown": "https://wpnews.pro/news/datasette-charts-0-1a0-sql-aggregates-across-every-row.md", "text": "https://wpnews.pro/news/datasette-charts-0-1a0-sql-aggregates-across-every-row.txt", "jsonld": "https://wpnews.pro/news/datasette-charts-0-1a0-sql-aggregates-across-every-row.jsonld"}}