AivexaNewsSearch
AI news for builders and product teamsChecked every hour

Scraping 107M rows of data to build this

Collected Oct 1, 2026

Ben's Bites has published a map-based website that shows what individual UK councils spend and with whom, built on a scrape of 107 million rows of public council payment data. The build was done largely with Codex agents and is documented in the newsletter's fifth session write-up, which includes a summary page with linked files and prototypes plus a tab for the full agent sessions. The author says final tweaks to the site and data are still underway ahead of open-sourcing.

The starting point is a UK transparency rule: every English council must publish what it pays out above £500. The data is public but scattered across council websites in inconsistent formats. To catalogue it, Codex ran three subagents in separate threads, which produced a list of 31 official sources, then returned real data from five councils. Each download was logged with a checksum fingerprint so the pipeline could confirm whether a file had changed since it was pulled.

That early data was flattened into a single spreadsheet. The author, based in Bedfordshire, asked for local data too, which surfaced an administrative wrinkle: Bedfordshire splits into Bedford, Central Bedfordshire and Luton, so a subagent was sent to fetch the remaining parts. Two councils blocked the agents at first, and the agents worked around the blocks. That stage ended with 8 councils, 1.8 million rows and £9 billion of spend in one clean CSV, plus a short blueprint of the collection plan.

With data in hand, the author had agents build visualisation prototypes: a receipt, a bank statement, a grid of counties, and a mini-site called "Your county's favourite retailer". Each was published straight to here.now, a simple hosting service aimed at agents, so the real thing could be clicked through on desktop and mobile rather than reviewed as screenshots. A few data stories in the style of The Pudding were also generated.

The full collection effort needed more than a laptop. The author moved bulk storage to a Mac Mini, and Codex recommended Parquet and DuckDB, neither of which the author had used before. Parquet stores data by column, so a query only reads the fields it needs; DuckDB is a database that lives in a single file and handles large tables quickly. Codex set up the Mini with both and tested it before planning the wider scrape.

That plan targeted roughly 382 councils across the UK, of which 339 in England and Wales were tracked. At that point 78 councils and 34.35 million rows had been gathered, but six councils, including Lancashire and Norfolk, were blocking the scrapers. The author later learned Wales does not share England's spend-reporting mandate and dropped Welsh councils. The main run was set up as a single goal: find every English council's spending page, download everything available, flatten and format it, have an auditor subagent verify the numbers, and load it into DuckDB on the Mini. It ran for nearly two days, and the author kept pushing for more speed and more subagents, since the process was reserving far more disk than needed. After 552 threads, 319 of the 339 councils were collected or parked, meaning no data existed or there was no route to it.

Prototyping resumed with four tools built in parallel from the same prompt: interactive comparison cards, a Council Ledger, charts and maps. The map view, called the Money Map, won out for seeing everything at once. The author first asked for a Google Maps clone, then had other agents produce Apple Maps versions, which felt better, and fed in screenshots to refine them. The resulting interface has clickable council outlines coloured by spend, category filter pills across the top, a ranked list on the left, and working search across councils and suppliers. Mock figures were used first to settle the visual hierarchy before real data went in.

Clean-up followed. App, data and design experiments were consolidated from three folders into two, one for data and one for the app. Four subagents classified 2,000 unknown vendors; date ranges were set, duplicate suppliers merged (Tesco appeared under six different names), and naming and categorisation reviewed, with an hour spent rewriting categories.

Testing caught a data problem: a £5m threshold filter was being applied, which skewed some figures. The cause is architectural. The app is a static site with no backend, so rather than loading all the data it capped what it shipped. The author's reasoning was to avoid standing up a backend, dump data into files, load them at publish, and let filters operate on the loaded data. Whether that was the right call, the author says, will show when people use it.

The final stretch was dominated by code, data and design reviews, changes, retesting and repetition, including judging whether categories were representative or large enough to stand alone, such as Pension Funds. The author worked by dumping voice notes and screenshots for agents to review, then accepting, rejecting or questioning their findings, and notes that processing that much review text is hard and not always fully read. Data validity was treated as non-negotiable, and bugs are expected despite the polish.

The headline usage figures: 8.2 billion tokens, 235 messages from the author and 656 subagents. This suggests the interesting signal for developers is less the spending site itself than the shape of the workflow, in which a single operator steers a large fleet of delegated agents through discovery, download, verification, prototyping and review, using checksum logging and an auditor agent to keep data honest. In practice, the absence of a backend is a likely trade-off: static files load fast and cheaply, but large datasets must be trimmed, and that trimming is exactly what produced the £5m cap. Product teams building data-heavy tools face the same choice between precomputed static assets and a query layer.

Why it matters: anyone treating public-sector transparency data as a product input can see both the opportunity and the cost. The opportunity is that mandated disclosure creates a large, free corpus, and agent fleets can catalogue and normalise it far faster than manual scraping; the cost is that councils block scrapers, administrative geographies are messy, and deduplication and categorisation need real review time. For developers, it is a concrete case study in agent orchestration with verification built in. Whether the static, no-backend approach holds up under real traffic is, by the author's own framing, still an open test.

Read at Ben's Bites

Based on reporting from the original publisher. Visit the source for full context and later updates.

Publisher excerpt

Ben’s session #5