datasette-charts 0.1a0 Simon Willison released datasette-charts 0.1a0, an alpha Datasette plugin that builds charts from any table or arbitrary SQL query, with the initial prototype written on Sunday using Claude Fable 5.2. Unlike the earlier datasette-vega plugin, which charted only the current page of up to 100 rows, datasette-charts compiles each chart into a SQL query that aggregates across the entire result set using GROUP BY, time bucketing and window functions, capping each query's result at 5,000 rows and sampling larger tables to suggest charts. The plugin vendors D3, Observable Plot and topojson-client, persists chart state in a URL #fragment for bookmarking and sharing, and is available to try in Datasette Lite. Release: datasette-charts 0.1a0 https://github.com/datasette/datasette-charts/releases/tag/0.1a0 I've been thinking about this problem for over a year now, but on Sunday I finally fired up Claude Fable 5.2 to build an initial prototype. The prototype went so well that this is now a full plugin. You can try it out in Datasette Lite here https://lite.datasette.io/?install=datasette-charts /content/stats chart=%7B%22v%22%3A1%2C%22type%22%3A%22line%22%2C%22encoding%22%3A%7B%22x%22%3A%7B%22column%22%3A%22date%22%2C%22timeUnit%22%3A%22week%22%7D%2C%22y%22%3A%7B%22column%22%3A%22downloads%22%2C%22aggregate%22%3A%22sum%22%7D%2C%22series%22%3A%7B%22column%22%3A%22package%22%2C%22limit%22%3A5%2C%22other%22%3Atrue%7D%7D%2C%22options%22%3A%7B%7D%7D . It looks like this: The new charts plugin works against any table or arbitrary SQL query in Datasette. It defines several different chart types using vendored D3 https://d3js.org , Observable Plot https://observablehq.github.io/plot/ , and topojson-client https://www.npmjs.com/package/topojson-client , each with a set of heuristics for identifying when they might be a good match for a specific set of rows. Those suggestion thumbnails at the top are actual visualizations driven by the data, and selecting one pulls up the full chart along with tools for modifying it. You can also manually construct a chart from scratch. As with other Datasette visualization plugins, the current state of your chart is persisted in a fragment in the URL - so you can bookmark charts or share them with others. The most important feature is that the charts take all rows into account . Previous charting plugins like datasette-vega https://github.com/simonw/datasette-vega would only show charts for the current page of results, generally up to 100 rows. The new plugin compiles each chart to a SQL query that aggregates across the entire result set potentially millions of rows using GROUP BY, time bucketing, and window functions. Each query returns a result capped at 5,000 rows, suitable for display on the chart. The plugin uses sampling to help suggest charts for larger tables without evaluating the full result set. I'm really happy with this initial release of the plugin. It's still very much an alpha, but it's the closest I've got to the dream of Datasette helping visualize data with as little required direction from the user as possible. Tags: coding-agents https://simonwillison.net/tags/coding-agents , generative-ai https://simonwillison.net/tags/generative-ai , projects https://simonwillison.net/tags/projects , ai https://simonwillison.net/tags/ai , llms https://simonwillison.net/tags/llms , datasette https://simonwillison.net/tags/datasette , visualization https://simonwillison.net/tags/visualization , claude-mythos-fable https://simonwillison.net/tags/claude-mythos-fable