The Commonplace
Home Papers Evidence Explore Trends Syntheses Digests About 🎲 Workforce Futures
← Papers
Direction, evidence grade, and study type are AI-generated labels (gpt-5-mini), not human-verified. Syntheses are LLM-written. "Tensions" are machine-detected candidates, not confirmed contradictions. A research-acceleration tool, not peer review. How this is built →

A new nationwide corpus unlocks local law for machine use: LOCUS collects ordinances from 9,239 U.S. cities and counties and provides a county-harmonized layer covering 2,309 counties, together with OCR processing, coverage metadata, and trained classifiers to analyze regulatory features such as opacity and paternalism.

Freeing the Law with LOCUS: A Local Ordinance Corpus for the United States
Denis Peskoff, Joe Barrow, Christopher Vu, Diag Davenport · June 17, 2026
arxiv descriptive n/a evidence 7/10 relevance Full text usable extracted full text Source PDF
LOCUS assembles and OCR-processes a nearly nation-scale corpus of U.S. municipal and county ordinances (9,239 jurisdictions; county-harmonized layer for 2,309 counties) and releases coverage metadata plus ModernBERT-based classifiers to enable large-scale legal AI research on local law.

Progress in legal AI increasingly depends on access to authoritative legal text at scale. Yet one of the most consequential layers of American law remains largely absent from existing machine-readable corpora: local ordinances. Local codes govern zoning, housing, business licensing, public health, noise, animal control, and many other domains of everyday regulation, but they are fragmented across vendor platforms designed for human browsing rather than bulk research access. We introduce LOCUS - the Local Ordinance Corpus for the United States - a comprehensive corpus and county-harmonized access layer for U.S. municipal and county ordinance codes. The raw corpus, available for release to researchers, represents nearly all publicly available municipal and county ordinance codes. The resulting raw corpus contains codes from 9,239 cities and counties. A smaller county-harmonized LOCUS access layer provides coverage for the largest 2,309 of 3,144 U.S. counties, accounting for a majority of the population. We use OCR to handle the myriad of document formats that have kept the law from being a public resource. We release the corpus with coverage metadata to support reproducibility, downstream legal AI research, and the incremental expansion of machine-readable access to local law. We train a collection of ModernBERT-based classifiers and scorers to facilitate analyzing U.S. local law among several dimensions, such as opacity and paternalism, that have not previously been studied at this scale. LOCUS-v1 and its derivative models are available at: https://huggingface.co/datasets/LocalLaws/LOCUS-v1

Summary

Main Finding

LOCUS (Local Ordinance Corpus for the United States) creates a nationwide, machine‑readable corpus and a county‑harmonized access layer of U.S. municipal and county ordinances, turning fragmented local law into reusable infrastructure for legal AI and empirical research. The release includes OCR’d text, per‑chunk function/topic labels, and continuous scores (opacity, paternalism, enforcement discretion, salience) produced by trained ModernBERT models. LOCUS-v1 covers 9,239 collected codes (∼7M PDF pages) in raw form and provides a county‑harmonized representation for the majority of U.S. population (codes chosen for ~2,309 counties), with annotated metadata and model outputs available to researchers.

Key Points

  • Coverage and scale

    • Raw corpus: 9,239 valid PDFs, ≈7 million pages, ≈80 GB.
    • Segmented into 2,211,516 text chunks; majority labeled substantive (rules/enforcement).
    • County‑harmonized access layer: for each U.S. county choose the longest available local code between county and the county’s largest municipality; yields coverage for the largest ~2,309 of 3,144 counties and covers ≈94% of the U.S. population by their selection rule.
    • Additional ∼7,000 documents collected but access restricted (release-to-researchers workflow analogous to MIMIC).
  • Processing pipeline

    • OCR: LightOnOCR-2-1B (VLM fine-tuned on PDF pages) converts images to Markdown; pipeline strips headers, merges pages, segments sections.
    • Extraction challenges: vendor platforms, nonstandard hosting, anti-bot measures, multi‑county cities — required targeted scraping and manual recovery for self‑hosted codes.
    • Cost/scale note: OCR pipeline run on Modal; ≈$0.30 per 1,000 pages.
  • Annotation & models

    • Initial labeling: GPT-5.4-nano used as a large-scale annotator for chunk classification (substantivity, function, topic). A subset of hard cases judged with a stronger GPT-5.4 run for validation.
    • Classifiers: ModernBERT‑base encoder (≈100M params) trained on 100k GPT-annotated laws (80k train /10k dev /10k eval) to classify function/topic/substantivity and applied at corpus scale.
    • Dimensional scorers: For four continuous axes — Enforcement Discretion, Opacity, Paternalism, Problem Salience — authors used 200k pairwise LLM (GPT-5.4-nano) matchups across 10k sampled ordinances to produce TrueSkill rankings; regression regressors (ModernBERT + linear head) were trained to predict z-scored TrueSkill values.
    • Scorer performance: Pearson correlations between BERT regressors and TrueSkill on held-out test sets range ~0.82–0.94 across the four dimensions.
  • Release and reproducibility

    • LOCUS-v1 and derivative models/datasets available on Hugging Face (LocalLaws/LOCUS-v1).
    • Corpus released with coverage metadata to support reproducible research and incremental expansion.
    • Design choice: county‑harmonized layer is a deliberately transparent simplification (longest-document proxy) and does not resolve legal hierarchy or controlling authority.

Data & Methods

  • Data collection

    • Automated browser tooling + vendor‑specific extraction logic + manual collection for self‑hosted documents.
    • Produced a raw archive of 9,239 PDFs (~7M pages) and additional withheld documents for controlled distribution.
  • OCR & preprocessing

    • Page-level OCR to Markdown using LightOnOCR-2-1B.
    • Artifact removal (repeated headers/footers), page-join heuristics (paragraphs/tables), segmentation into individual ordinance sections.
  • Labeling pipeline

    • LLM‑as‑annotator: GPT-5.4-nano for large-scale zero‑shot labeling (function/topic/substantivity); higher-quality GPT-5.4 used for ~5.5% most challenging items.
    • Training labels: 100k sampled laws annotated by GPT-5.4-nano; ModernBERT classifiers trained to scale labels across corpus.
  • Dimensional scoring

    • Pairwise comparisons: 200k (A vs B) matchups over 10k sampled ordinances; each pair judged in both orders to mitigate order bias.
    • Aggregation: TrueSkill used to produce latent continuous scores per ordinance.
    • Regression: ModernBERT-base fine-tuned to predict normalized TrueSkill z-scores per axis (train 8k / val 1k / test 1k).
    • Evaluation: Pearson correlation between predicted and TrueSkill scores (0.82–0.94).
  • Harmonized access layer

    • For each county, compare county code and code of the county’s largest municipality; select the longer code as the representative artifact. This gives a reproducible geographic substrate but does not adjudicate legal primacy.
  • Limitations noted by authors

    • Harmonized layer is a pragmatic proxy (length correlates with population but not legal authority).
    • Reliance on LLM‑based annotation introduces noise and possible systematic bias; evaluation relies on model agreement and some manual checks.
    • OCR and segmentation errors possible given heterogeneous source formats.
    • Some jurisdictions remain self‑hosted or restricted; extra documents require controlled access.

Implications for AI Economics

  • New infrastructure for empirical regulatory economics

    • LOCUS turns previously fragmented local regulatory text into a national dataset, enabling economists to measure and compare regulation at municipal/county granularity across domains (zoning, licensing, building codes, nuisance rules).
    • Researchers can link LOCUS to Census, economic, geographic, and administrative data to estimate effects of local regulation on housing supply, firm entry, wages, firm location, compliance costs, and local public goods provision.
  • Quantifying heterogeneity and regulatory frictions

    • The continuous dimensions (opacity, paternalism, enforcement discretion, salience) provide novel, quantifiable features to use as explanatory variables or instruments for causal analysis (e.g., opacity as a proxy for compliance cost or information friction; paternalism scores for consumer‑protection policy intensity).
    • Cross‑jurisdictional variation can be exploited for difference‑in‑differences, RD, or synthetic control designs to evaluate local policy impacts.
  • Market and firm strategy implications

    • Firms (especially regulated industries: construction, hospitality, short‑term rentals, local retail) can use LOCUS to map regulatory environments and adapt product design or compliance processes, reducing discovery costs and enabling targeted compliance investments.
    • Startups and incumbents in legaltech or regulatory data services can build higher‑value products (automated permitting, local compliance checkers) with lower data acquisition costs; this could increase competition and lower service prices.
  • Effects on legal services and labor

    • Improved machine access to local law could automate parts of regulatory research, changing demand for routine legal work and increasing the value of higher‑order advisory services (strategic interpretation, litigation).
    • Local governments and consultants may face pressure to harmonize or simplify regulations; transparency could shift bargaining and enforcement dynamics.
  • Model training, evaluation, and policy for AI systems

    • LOCUS supplies domain data for fine‑tuning legal LLMs, improving retrieval/Q&A over local law and enabling fairness/robustness evaluations that account for jurisdictional variation.
    • Economists studying AI markets can use LOCUS to measure model coverage of local law, dataset biases, and the consequences of incomplete local legal data on downstream applications.
  • Cautions and potential negative externalities

    • Harmonized simplification: using the longest-code proxy may misrepresent which authority controls on a particular issue; causal inference must account for this measurement error.
    • Annotation/OCR noise and LLM‑bias: scores and labels derive from LLM judgments and OCR output; downstream analyses should account for measurement error and validate critical measures with manual review.
    • Regulatory arbitrage risk: easier discovery of lenient jurisdictions could incentivize relocation or regulatory shopping; researchers and policymakers should consider spillovers.
    • Legal/ethical access constraints: some documents are withheld and require controlled access; researchers must follow release conditions.
  • Practical suggestions for economists

    • Link LOCUS records to county and municipality identifiers (FIPS, GEOIDs) and Census covariates to study outcomes like housing starts, rents, firm entry, and local labor markets.
    • Use opacity and enforcement‑discretion scores as proxies for administrative burden or enforcement risk in regressions estimating compliance costs or firm behavior.
    • Exploit spatial and temporal variation in ordinance text (where available) for quasi‑experimental designs—e.g., before/after local code amendments, or comparing neighboring jurisdictions.
    • Validate classifiers/scores on focused samples (manual annotation) when precise legal interpretation matters for identification.
    • Consider instrumenting for regulation using political or historical predictors of local code style (e.g., home‑rule prevalence, state preemption patterns) to address endogeneity.

In short, LOCUS materially lowers the data barrier to studying and building systems that depend on local regulation. For AI economists, it is both a new input for measurement and a potential source of insights about how regulatory heterogeneity shapes markets, firms, and the adoption of legal‑AI tools.

Assessment

Paper Typedescriptive Evidence Strengthn/a — The work is primarily a data-construction and resource paper (corpus release and trained classifiers) rather than an empirical study making causal claims, so conventional evidence-strength for causal inference does not apply. Methods Rigormedium — The authors assemble a very large and valuable corpus (raw coverage from 9,239 municipal/county codes; county-harmonized layer for 2,309 counties), use OCR to normalize heterogeneous source formats, and provide coverage metadata and classifier models; however, potential issues remain (OCR error rates and their mitigation are not fully characterized here, selection bias from vendor-hosted sources and missing jurisdictions, limited detail on annotation protocols and classifier validation across jurisdictions, and temporal/versioning concerns), which reduce methodological certainty from 'high' to 'medium'. SampleAn OCR-processed corpus of U.S. municipal and county ordinance codes scraped from publicly available sources and vendor platforms: the raw corpus contains codes from 9,239 cities and counties; a county-harmonized access layer covers 2,309 of 3,144 U.S. counties (covering a majority of the U.S. population); includes coverage metadata and derivatively trained ModernBERT-based classifiers/scorers for dimensions such as opacity and paternalism. Themesgovernance innovation GeneralizabilityNot national-complete: harmonized layer covers 2,309 of 3,144 counties and some municipalities are absent, Potential selection bias from vendor-hosted or non-machine-readable sources that were inaccessible, OCR errors and formatting heterogeneity may vary by jurisdiction, affecting downstream text quality, Temporal limitations: snapshot may not capture later ordinance updates or rescissions, Legal nuance and interpretation (context, cross-references, case law) are not encoded and limit legal-generalizability, U.S.-centric (does not generalize to other countries or legal systems), Classifier models (ModernBERT derivatives) may not generalize across jurisdictions or time without retraining

Claims (10)

ClaimDirectionOutcomeConfidence & EvidenceDetails
Progress in legal AI increasingly depends on access to authoritative legal text at scale. Research Productivity positive dependence of legal AI progress on large-scale access to authoritative legal text
Reading fidelity medium
Study strength speculative
not reported
0.02
One of the most consequential layers of American law remains largely absent from existing machine-readable corpora: local ordinances. Research Productivity negative presence/absence of local ordinances in existing machine-readable legal corpora
Reading fidelity high
Study strength medium
not reported
0.18
We introduce LOCUS - the Local Ordinance Corpus for the United States - a comprehensive corpus and county-harmonized access layer for U.S. municipal and county ordinance codes. Research Productivity positive existence of a comprehensive corpus and county-harmonized access layer for U.S. local ordinances
Reading fidelity high
Study strength medium
not reported
0.18
The raw corpus, available for release to researchers, represents nearly all publicly available municipal and county ordinance codes. Adoption Rate positive coverage proportion of publicly available municipal and county ordinance codes
Reading fidelity medium
Study strength medium
nearly all publicly available municipal and county ordinance codes
0.11
The resulting raw corpus contains codes from 9,239 cities and counties. Adoption Rate positive number of cities and counties covered in raw corpus
Reading fidelity high
Study strength high
n=9239
9,239 cities and counties
0.3
A smaller county-harmonized LOCUS access layer provides coverage for the largest 2,309 of 3,144 U.S. counties, accounting for a majority of the population. Adoption Rate positive county coverage in harmonized access layer and population coverage
Reading fidelity high
Study strength medium
n=2309
2,309 of 3,144 U.S. counties; accounts for a majority of the population
0.18
We use OCR to handle the myriad of document formats that have kept the law from being a public resource. Research Productivity positive use of OCR preprocessing to convert diverse ordinance document formats into machine-readable text
Reading fidelity high
Study strength high
not reported
0.3
We release the corpus with coverage metadata to support reproducibility, downstream legal AI research, and the incremental expansion of machine-readable access to local law. Research Productivity positive availability of corpus plus coverage metadata to support reproducibility and downstream research
Reading fidelity high
Study strength medium
not reported
0.18
We train a collection of ModernBERT-based classifiers and scorers to facilitate analyzing U.S. local law among several dimensions, such as opacity and paternalism, that have not previously been studied at this scale. Research Productivity positive trained classifiers/scorers for dimensions like opacity and paternalism applied to local law
Reading fidelity high
Study strength medium
not reported
0.18
LOCUS-v1 and its derivative models are available at: https://huggingface.co/datasets/LocalLaws/LOCUS-v1 Research Productivity positive public availability of LOCUS-v1 dataset and derivative models at specified URL
Reading fidelity high
Study strength high
available at https://huggingface.co/datasets/LocalLaws/LOCUS-v1
0.3

Notes