Diag Davenport was trying to study bias in local laws when he hit a wall: no one knew where all the laws were. From tiny towns to sprawling counties, America’s 9,000+ local governments write their own rules—about noise, pets, construction, even how you sell fruit by the roadside. But those laws are buried in messy PDFs, outdated websites, or locked behind paywalls. So Davenport, an assistant professor at UC Berkeley, set out to find them all.

His team launched a first-of-its-kind project to collect every digitally available local law across the U.S. Using AI and data science, they pulled in documents from over 9,000 jurisdictions—from Alameda, California to Zephyrhills, Florida—and turned nearly 7 million pages into a free, searchable database. It’s the first comprehensive collection of local laws in the country, a digital mirror of how Americans are governed at the most personal level.

The challenge wasn’t just scale—it was chaos. Laws were stored as blurry scans, poorly formatted files, or hidden behind clunky websites. To make sense of it, the team used an advanced AI tool called LightOnOCR, which can read both text and layout in scanned documents. With help from postdoctoral scholar Denis Peskoff, AI researcher Joe Barrow, and undergraduate Christopher Vu, they converted the mess into clean, machine-readable data. Now, researchers, journalists, or curious residents can search, compare, and analyze laws like never before.

This isn’t just about convenience. Local laws shape daily life—where you can build a shed, whether your dog needs a leash, how noise is enforced. They also reflect deeper patterns. Davenport’s original goal was to study whether places with histories of systemic discrimination have stricter or more punitive local codes. Now, with this database, that research is finally possible.

The impact could ripple far beyond academia. City planners could benchmark building codes. Reporters could uncover disparities in enforcement. Developers could avoid costly surprises. And ordinary people could finally understand the rules that affect them most.

"We've built a new kind of telescope—one pointed at governance itself," Davenport said. This tool doesn’t just organize laws—it opens a window into how power works, block by block, town by town. And as AI tools improve, the team hopes to add real-time updates, multilingual search, and even local chatbots that answer questions in plain language. For the first time, America’s thicket of local rules is becoming visible, searchable, and, most importantly, accountable.