Kevin Schaul, a data journalist at the Washington Post, used Anthropic’s Claude Code to automate a classic data journalism challenge: consolidating messy government data spread across dozens of agencies.
What do 1,000 journalists and PR pros know about AI that you don't? They took AI Quick Start, a 1-hour live class from The Media Copilot. 94% satisfaction. Find out how to work smarter with AI in just 60 minutes. Get 20% off with the code AIPRO: https://mediacopilot.ai/
The result was a story published Feb. 9 outlining how the federal government uses AI, based on inventory spreadsheets that each agency is required to publish. The problem: each agency posts files in different locations, formats and column structures.
How he did it
Schaul used Claude Code (running Opus 4.5) to search for each agency’s AI inventory page, download the files and write a Python script to consolidate them into a single dataset.
His initial prompt was ambitious: search for all agencies, find their inventory files, download them and consolidate into one CSV. That hit usage limits after 10 minutes of web searches without completing the full task.
“I should have had it fill out a spreadsheet as it went,” Schaul wrote in a blog post about the process. “Save all incremental progress to file.”
He switched to breaking the work into discrete steps: first compile a list of agencies and their inventory URLs, then download files, then consolidate. That worked better.
The consolidation step is where AI provided the biggest time savings. Claude Code iteratively wrote and refined a Python script to merge files with inconsistent column names and data formats.
“That would have been horribly tedious to write by hand,” Schaul wrote.
The trust question
Schaul emphasized he read all the generated code.
“When you’re doing data journalism, vibes are not enough,” he wrote. “I have been told ‘You’re absolutely right!’ far too many times by these tools to trust them.”
He distinguishes between having an LLM directly interpret data (which he wouldn’t trust) and having it write auditable code that can be reviewed and rerun.
“Having AI write and execute code that can be audited? I’m quite comfortable with that,” he said.

What it means
This workflow illustrates a practical middle ground for AI in newsrooms: using AI to automate tedious technical tasks while maintaining human oversight of the journalism itself.
The approach requires:
- Breaking complex tasks into discrete steps
- Saving incremental progress
- Reading and auditing all generated code
- Maintaining reproducibility through scripts
For data journalists who regularly wrangle messy datasets, this kind of AI assistance can turn days of work into hours — as long as you verify the code does what you think it does.







