To decipher local laws, researchers used AI to build a database of millions of them
UC Berkeley researchers created a free AI-powered database compiling millions of local laws nationwide, enabling easier comparison and analysis of municipal ordinances for the first time.
America’s patchwork of local laws—from noise ordinances to roadside mango peddling rules—has long been difficult to navigate due to fragmented, outdated government websites and dense PDFs. Researchers at UC Berkeley addressed this by building the first open-access database of digitally accessible local laws, spanning jurisdictions from Alameda, California, to Zephyrhills, Florida. The project aims to simplify access for policymakers, developers, and residents who previously faced costly delays or confusion when researching regulations.
Diag Davenport, lead researcher and assistant professor at Berkeley, initiated the project six years ago to study potential biases in local laws by comparing ordinances across jurisdictions with varying histories of discrimination. The team encountered a major obstacle: no comprehensive database of local laws existed, forcing them to gather documents from thousands of fragmented sources, including proprietary databases and convoluted government websites.
Technological advances, particularly AI tools like LightOnOCR and models from OpenAI, enabled the team to process nearly 10,000 unwieldy documents—roughly 7 million pages—into a standardized, machine-readable format. The resulting database contains millions of unique ordinances from all 50 states, allowing researchers to identify patterns in how communities regulate housing, public spaces, and business activities at an unprecedented scale.
The team published a preliminary version of the database online in June, with some users already creating searchable interfaces based on their work. Davenport plans to present the project at the Conference on Neural Information Processing Systems in December, emphasizing the potential for future tools like chatbots trained on specific local codes to streamline compliance and cost estimation for developers and homeowners.