<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en-us" xmlns="http://www.w3.org/2005/Atom"><title>Simon Willison's Weblog: datasette-charts</title><link href="http://simonwillison.net/" rel="alternate"/><link href="http://simonwillison.net/tags/datasette-charts.atom" rel="self"/><id>http://simonwillison.net/</id><updated>2026-11-25T18:16:50+00:00</updated><author><name>Simon Willison</name></author><entry><title>datasette-charts 0.3a0</title><link href="https://simonwillison.net/2026/Nov/25/datasette-charts/" rel="alternate"/><published>2026-11-25T18:16:50+00:00</published><updated>2026-11-25T18:16:50+00:00</updated><id>https://simonwillison.net/2026/Nov/25/datasette-charts/</id><summary type="html">
    
        &lt;p&gt;&lt;strong&gt;Release:&lt;/strong&gt; &lt;a href="https://github.com/datasette/datasette-charts/releases/tag/0.3a0"&gt;datasette-charts 0.3a0&lt;/a&gt;&lt;/p&gt;
        &lt;p&gt;I added chart annotations to &lt;a href="https://github.com/datasette/datasette-charts"&gt;datasette-charts&lt;/a&gt;!&lt;/p&gt;
&lt;p&gt;You can now render a chart and then annotate it with lines, shaded areas, labels, or a combination of the three.&lt;/p&gt;
&lt;p&gt;A chart with annotations looks like this:&lt;/p&gt;
&lt;p&gt;&lt;img alt="Screenshot of an annotated bar chart with the y-axis label &amp;quot;↑ Total capacity_mw&amp;quot;, showing blue bars for each decade from 1950 to 2010. Capacity is low in the earlier decades, then jumps sharply for 2000 and 2010. The chart carries three annotations: a gray shaded band across 1950 to 1990 with the note &amp;quot;Much smaller summed capacity in earlier decades&amp;quot;, a dot on top of the 2000 bar labeled &amp;quot;Largest decade total in these records: 1.157 million MW&amp;quot;, and a dashed horizontal line labeled &amp;quot;1,000,000 MW reference&amp;quot;. A caption below reads &amp;quot;Global plant records with commissioning years 1950–2019; coverage and missing years may affect comparisons.&amp;quot;" src="https://static.simonwillison.net/static/2026/chart-with-annotations.webp" /&gt;&lt;/p&gt;
&lt;p&gt;Here's &lt;a href="https://lite.datasette.io/?install=datasette-charts&amp;amp;url=https://datasette.io/global-power-plants.db#/global-power-plants/-/query?sql=SELECT+CAST%28commissioning_year+%2F+10+AS+INTEGER%29+%2A+10+AS+decade%2C+capacity_mw+FROM+%22global-power-plants%22+WHERE+commissioning_year+BETWEEN+1950+AND+2019+AND+capacity_mw+IS+NOT+NULL#chart=%7B%22v%22%3A1%2C%22type%22%3A%22bar%22%2C%22encoding%22%3A%7B%22x%22%3A%7B%22column%22%3A%22decade%22%2C%22sort%22%3A%22key%22%2C%22limit%22%3A20%2C%22other%22%3Afalse%7D%2C%22y%22%3A%7B%22column%22%3A%22capacity_mw%22%2C%22aggregate%22%3A%22sum%22%7D%7D%2C%22options%22%3A%7B%22orientation%22%3A%22vertical%22%7D%2C%22annotations%22%3A%5B%7B%22type%22%3A%22point%22%2C%22x%22%3A2000%2C%22text%22%3A%22Largest%20decade%20total%20in%20these%20records%3A%201.157%20million%20MW%22%7D%2C%7B%22type%22%3A%22range%22%2C%22x%22%3A1950%2C%22x2%22%3A1990%2C%22text%22%3A%22Much%20smaller%20summed%20capacity%20in%20earlier%20decades%22%7D%2C%7B%22type%22%3A%22line%22%2C%22y%22%3A1000000%2C%22text%22%3A%221%2C000%2C000%20MW%20reference%22%7D%2C%7B%22type%22%3A%22text%22%2C%22left%22%3A0.02%2C%22top%22%3A0.04%2C%22text%22%3A%22Global%20plant%20records%20with%20commissioning%20years%201950–2019%3B%20coverage%20and%20missing%20years%20may%20affect%20comparisons.%22%7D%5D%7D"&gt;that same chart in Datasette Lite&lt;/a&gt;, where you can tweak the annotations using the chart builder UI:&lt;/p&gt;
&lt;p&gt;&lt;img alt="Animated screen recording of an &amp;quot;Edit annotation&amp;quot; dialog for a chart titled &amp;quot;Total capacity_mw by decade&amp;quot;. A form on the left has fields for &amp;quot;Kind&amp;quot;, &amp;quot;Capacity_mw&amp;quot;, &amp;quot;Label (optional)&amp;quot;, &amp;quot;Label position&amp;quot;, &amp;quot;Color&amp;quot; and &amp;quot;Line style&amp;quot;, and a &amp;quot;PREVIEW&amp;quot; panel on the right shows a blue bar chart of total capacity by decade from 1950 to 2010, with a dashed horizontal line labeled &amp;quot;1,000,000 MW reference&amp;quot;. The preview updates live as the user edits: changing the Capacity_mw value from &amp;quot;1000000&amp;quot; to &amp;quot;900000&amp;quot; and then &amp;quot;800000&amp;quot; moves the dashed line down the chart in step, and editing the label text, first adding an exclamation mark, then removing it and deleting the word &amp;quot;reference&amp;quot;, changes the label on the line to &amp;quot;1,000,000 MW reference!&amp;quot; and finally &amp;quot;1,000,000 MW&amp;quot;. The user then clicks the &amp;quot;Save&amp;quot; button." src="https://static.simonwillison.net/static/2026/chart-annotate.gif" /&gt;&lt;/p&gt;
&lt;p&gt;If you also install &lt;a href="https://agent.datasette.io/"&gt;Datasette Agent&lt;/a&gt; the agent can build annotated charts for you. Here's what I got on the &lt;a href="https://agent.datasette.io/"&gt;agent.datasette.io&lt;/a&gt; demo for this prompt:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;Show a chart comparing Simon's tagged content about LLMs with his tagged content about Datasette, with annotations&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;img alt="Screenshot of a chat-style AI agent interface that has produced a chart in response to a question. At the top is a collapsed reasoning line reading &amp;quot;Thinking: …26 partial year is labeled correctly in the output. Let's go with this approach!&amp;quot; followed by a collapsed tool call labeled &amp;quot;chart&amp;quot;. Below that is a line chart titled &amp;quot;Total content_count per year by topic&amp;quot;, with a legend for &amp;quot;LLMs&amp;quot; (blue) and &amp;quot;Datasette&amp;quot; (orange), the y-axis label &amp;quot;↑ Total content_count&amp;quot; and years 2017 to 2026 on the x-axis. The Datasette line stays low throughout, with an annotation &amp;quot;Datasette peak year&amp;quot; pointing at 2020. The LLMs line sits near zero until 2022, then climbs steeply to a peak in 2025 before dropping in 2026, with an annotation &amp;quot;LLM-tagged content rises&amp;quot; pointing at 2023. A note on the chart reads &amp;quot;Counts include posts, notes and links; 2026 is year-to-date.&amp;quot; Under the chart are the controls &amp;quot;Open in the chart builder&amp;quot;, &amp;quot;Copy link&amp;quot;, &amp;quot;This chart's SQL&amp;quot;, &amp;quot;Copy TSV&amp;quot; and &amp;quot;Copy CSV&amp;quot;. Another collapsed reasoning line reads &amp;quot;Thinking: …rends start low for LLMs in 2020, and they're projected to rise sharply by 2026.&amp;quot; The agent's reply then says: &amp;quot;The chart compares annual counts of non-draft posts, notes, and link posts tagged with LLM-related terms or Datasette-related terms. The annotations mark Datasette's peak year (2020) and the sharp rise in LLM-tagged content beginning in 2023. 2026 is year-to-date.&amp;quot; At the bottom is a message box with the placeholder &amp;quot;Type a message... (# to tag a table or query)&amp;quot; and a &amp;quot;Send&amp;quot; button." src="https://static.simonwillison.net/static/2026/annotations-agent.webp" /&gt;&lt;/p&gt;
    
    
        &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/visualization"&gt;visualization&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/datasette"&gt;datasette&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/datasette-charts"&gt;datasette-charts&lt;/a&gt;&lt;/p&gt;
    

</summary><category term="visualization"/><category term="datasette"/><category term="datasette-charts"/></entry><entry><title>datasette-charts 0.2a1</title><link href="https://simonwillison.net/2026/Nov/24/datasette-charts-2/" rel="alternate"/><published>2026-11-24T06:07:19+00:00</published><updated>2026-11-24T06:07:19+00:00</updated><id>https://simonwillison.net/2026/Nov/24/datasette-charts-2/</id><summary type="html">
    
        &lt;p&gt;&lt;strong&gt;Release:&lt;/strong&gt; &lt;a href="https://github.com/datasette/datasette-charts/releases/tag/0.2a1"&gt;datasette-charts 0.2a1&lt;/a&gt;&lt;/p&gt;
        &lt;blockquote&gt;
&lt;p&gt;Minor UI improvements:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Collapsing the &lt;strong&gt;suggested charts&lt;/strong&gt; section now leaves the chart visible.&lt;/li&gt;
&lt;li&gt;Following a link to a chart opens it with the suggestions collapsed for that visit.&lt;/li&gt;
&lt;li&gt;On table pages the panel now sits below the "4,235 rows where country = CHN" line.&lt;/li&gt;
&lt;li&gt;The "Data" table under each chart has been replaced by &lt;strong&gt;Copy TSV&lt;/strong&gt; and &lt;strong&gt;Copy CSV&lt;/strong&gt; buttons.&lt;/li&gt;
&lt;li&gt;Removed the "Chart this data" item from the table, view and query action menus.&lt;/li&gt;
&lt;li&gt;More space between lines in chart tooltips.&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;
    
    
        &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/visualization"&gt;visualization&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/datasette"&gt;datasette&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/datasette-charts"&gt;datasette-charts&lt;/a&gt;&lt;/p&gt;
    

</summary><category term="visualization"/><category term="datasette"/><category term="datasette-charts"/></entry><entry><title>datasette-charts 0.2a0</title><link href="https://simonwillison.net/2026/Nov/24/datasette-charts/" rel="alternate"/><published>2026-11-24T04:24:29+00:00</published><updated>2026-11-24T04:24:29+00:00</updated><id>https://simonwillison.net/2026/Nov/24/datasette-charts/</id><summary type="html">
    
        &lt;p&gt;&lt;strong&gt;Release:&lt;/strong&gt; &lt;a href="https://github.com/datasette/datasette-charts/releases/tag/0.2a0"&gt;datasette-charts 0.2a0&lt;/a&gt;&lt;/p&gt;
        &lt;p&gt;I introduced this new charting plugin for Datasette &lt;a href="https://simonwillison.net/2026/Nov/23/datasette-charts/"&gt;yesterday&lt;/a&gt;. Today it's gained integration with &lt;a href="https://agent.datasette.io/"&gt;Datasette Agent&lt;/a&gt;, so now you can ask chat for a chart and it will create one for you using the same underlying chart suggestion and generation tools.&lt;/p&gt;
&lt;p&gt;Here's a demo video, recorded on &lt;a href="https://agent.datasette.io/"&gt;agent.datasette.io&lt;/a&gt;  where you can sign in with GitHub to try the plugin yourself:&lt;/p&gt;
&lt;figure&gt;
  &lt;video controls playsinline preload="none"
         width="1440" height="1080"
         style="max-width: 100%; height: auto"
         poster="https://static.simonwillison.net/static/cors-allow/2026/datasette-charts-agent-demo.webp"
         aria-label="Demo of the Datasette charts agent (silent screen recording)"
         aria-describedby="charts-demo-desc"&gt;
    &lt;source src="https://static.simonwillison.net/static/cors-allow/2026/datasette-charts-agent-demo.mp4" type="video/mp4"&gt;
    &lt;a href="https://static.simonwillison.net/static/cors-allow/2026/datasette-charts-agent-demo.mp4"&gt;Download the video (MP4)&lt;/a&gt;
  &lt;/video&gt;
  &lt;figcaption id="charts-demo-desc" style="margin-top: 1em"&gt;
    I prompt Datasette Agent to "Use #stats to show sqlite-utils downloads over time as a chart" - where typing "#stats" opens a table search box. It shows me a chart inline in the chat, and when I click "Open in the chart builder" it opens the chart in a panel along with the table page. I use the table page to switch to a chart of "datasette", then when I ask the agent "what does the chart show?" it notices that I changed the content in the panel and describes the new Datasette chart to me.
  &lt;/figcaption&gt;
&lt;/figure&gt;

&lt;p&gt;Here's &lt;a href="https://gist.github.com/simonw/12646fcc72dddae3d4ac04b496c20af2"&gt;a Markdown export&lt;/a&gt; of the chat from the video.&lt;/p&gt;
    
    
        &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/visualization"&gt;visualization&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/datasette"&gt;datasette&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/datasette-agent"&gt;datasette-agent&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/datasette-charts"&gt;datasette-charts&lt;/a&gt;&lt;/p&gt;
    

</summary><category term="visualization"/><category term="datasette"/><category term="datasette-agent"/><category term="datasette-charts"/></entry><entry><title>datasette-charts 0.1a0</title><link href="https://simonwillison.net/2026/Nov/23/datasette-charts/" rel="alternate"/><published>2026-11-23T00:37:20+00:00</published><updated>2026-11-23T00:37:20+00:00</updated><id>https://simonwillison.net/2026/Nov/23/datasette-charts/</id><summary type="html">
    
        &lt;p&gt;&lt;strong&gt;Release:&lt;/strong&gt; &lt;a href="https://github.com/datasette/datasette-charts/releases/tag/0.1a0"&gt;datasette-charts 0.1a0&lt;/a&gt;&lt;/p&gt;
        &lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;You can &lt;a href="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"&gt;try it out in Datasette Lite here&lt;/a&gt;. It looks like this:&lt;/p&gt;
&lt;p&gt;&lt;img alt="Screenshot of a Datasette table page for a &amp;quot;stats&amp;quot; table showing a new Charts panel. A row of suggested chart thumbnail cards sits at the top, each with a small preview, a title and a plain-English description: &amp;quot;Total downloads per week of date&amp;quot;, &amp;quot;Total downloads by package&amp;quot;, &amp;quot;Distribution of downloads&amp;quot;, &amp;quot;Total downloads per week of date by package&amp;quot; (selected) and &amp;quot;Rows per week of date&amp;quot;. A note says suggestions are based on a sample of rows while charts use every row. Below, the selected chart is shown full size as a multi-series line chart of total downloads over time, with a color legend for sqlite-utils, csv-diff, datasette, llm, shot-scraper and Other. A sidebar on the right has dropdowns for Chart type (Line chart), Time (date, per week), Value (downloads, show Total) and Split by (package, keep top 5), plus a checked &amp;quot;Group the rest as Other&amp;quot; option. Under the chart are a &amp;quot;View and edit this chart's SQL&amp;quot; link, a &amp;quot;Copy link to this chart&amp;quot; button, an expandable Data section and a Close button." src="https://static.simonwillison.net/static/2026/datasette-charts-0.1a0.webp" /&gt;&lt;/p&gt;
&lt;p&gt;The new charts plugin works against any table or arbitrary SQL query in Datasette. It defines several different chart types (using vendored &lt;a href="https://d3js.org"&gt;D3&lt;/a&gt;, &lt;a href="https://observablehq.github.io/plot/"&gt;Observable Plot&lt;/a&gt;, and &lt;a href="https://www.npmjs.com/package/topojson-client"&gt;topojson-client&lt;/a&gt;), each with a set of heuristics for identifying when they might be a good match for a specific set of rows.&lt;/p&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;As with other Datasette visualization plugins, the current state of your chart is persisted in a &lt;code&gt;#fragment&lt;/code&gt; in the URL - so you can bookmark charts or share them with others.&lt;/p&gt;
&lt;p&gt;The most important feature is that the charts take &lt;em&gt;all rows into account&lt;/em&gt;. Previous charting plugins like &lt;a href="https://github.com/simonw/datasette-vega"&gt;datasette-vega&lt;/a&gt; would only show charts for the current page of results, generally up to 100 rows.&lt;/p&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;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.&lt;/p&gt;
    
    
        &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/projects"&gt;projects&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/visualization"&gt;visualization&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/ai"&gt;ai&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/datasette"&gt;datasette&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/generative-ai"&gt;generative-ai&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/llms"&gt;llms&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/coding-agents"&gt;coding-agents&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/claude-mythos-fable"&gt;claude-mythos-fable&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/datasette-charts"&gt;datasette-charts&lt;/a&gt;&lt;/p&gt;
    

</summary><category term="projects"/><category term="visualization"/><category term="ai"/><category term="datasette"/><category term="generative-ai"/><category term="llms"/><category term="coding-agents"/><category term="claude-mythos-fable"/><category term="datasette-charts"/></entry></feed>