Coding agents for data analysis
Simon Willison
Archived Mar 17, 2026
✓ Full text saved
Coding agents for data analysis Here's the handout I prepared for my NICAR 2026 workshop "Coding agents for data analysis" - a three hour session aimed at data journalists demonstrating ways that tools like Claude Code and OpenAI Codex can be used to explore, analyze and clean data. Here's the table of contents: Coding agents Warmup: ChatGPT and Claude Setup Claude Code and Codex Asking questions against a database Exploring data with agents Cleaning data: decoding neighborhood codes Creating vi
✦ Summarize
☆ Save
Full text archived locally
Simon Willison’s Weblog
Subscribe
Sponsored by: CodeRabbit — Planner helps 10x your coding agents while minimizing rework and AI slop. Try Now.
Coding agents for data analysis. Here's the handout I prepared for my NICAR 2026 workshop "Coding agents for data analysis" - a three hour session aimed at data journalists demonstrating ways that tools like Claude Code and OpenAI Codex can be used to explore, analyze and clean data.
Here's the table of contents:
Coding agents
Warmup: ChatGPT and Claude
Setup Claude Code and Codex
Asking questions against a database
Exploring data with agents
Cleaning data: decoding neighborhood codes
Creating visualizations with agents
Scraping data with agents
I ran the workshop using GitHub Codespaces and OpenAI Codex, since it was easy (and inexpensive) to distribute a budget-restricted API key for Codex that attendees could use during the class. Participants ended up burning $23 of Codex tokens.
The exercises all used Python and SQLite and some of them used Datasette.
One highlight of the workshop was when we started running Datasette such that it served static content from a viz/ folder, then had Claude Code start vibe coding new interactive visualizations directly in that folder. Here's a heat map it created for my trees database using Leaflet and Leaflet.heat, source code here.
I designed the handout to also be useful for people who weren't able to attend the session in person. As is usually the case, material aimed at data journalists is equally applicable to anyone else with data to explore.
Posted 16th March 2026 at 8:12 pm
Recent articles
My fireside chat about agentic engineering at the Pragmatic Summit - 14th March 2026
Perhaps not Boring Technology after all - 9th March 2026
Can coding agents relicense open source through a “clean room” implementation of code? - 5th March 2026
This is a link post by Simon Willison, posted on 16th March 2026.
data-journalism 76 geospatial 82 python 1232 speaking 119 sqlite 447 ai 1913 datasette 1456 generative-ai 1696 llms 1662 github-codespaces 12 nicar 12 coding-agents 178 claude-code 98 codex-cli 28 leaflet 46
Monthly briefing
Sponsor me for $10/month and get a curated email digest of the month's most important LLM developments.
Pay me to send you less!
Sponsor & subscribe
Disclosures Colophon © 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026