Skip to content

Repository files navigation

visualize laws

Explore and compare U.S. local laws with full-text search, filters, jurisdiction aggregates, and an interactive map. The current corpus is LOCUS-v1, covering roughly 2.2 million local ordinances.

docker quick start

With Docker running:

docker compose up

This starts Postgres and the app, applies migrations, loads the default sample on a fresh database, and serves the app at http://localhost:3000.

Useful Docker commands:

pnpm up          # same as docker compose up
pnpm up:build    # rebuild before starting
pnpm db:down     # stop the database and app

If you move or rename the repository directory, recreate the containers:

docker compose up -d --force-recreate

local development

Run Postgres in Docker and the app on your machine:

pnpm install
cp .env.example .env.local
pnpm db:up
pnpm prisma:deploy
pnpm dev

seeding

Load the default sample:

pnpm seed --limit 25000

Load the complete corpus:

pnpm db:up
pnpm seed

You can also seed from the app container:

docker compose exec app pnpm seed

Helpful options:

pnpm seed --fresh       # reset and reseed
pnpm seed --limit 1000  # small local sample
pnpm seed --shards 0,1  # selected data shards

common commands

pnpm dev
pnpm build
pnpm typecheck
pnpm lint
pnpm db:studio

attribution

This project uses the LOCUS-v1 corpus.

@article{peskoff2026freeing,
  title={Freeing the Law with LOCUS: A Local Ordinance Corpus for the United States},
  author={Peskoff, Denis and Barrow, Joe and Vu, Christopher and Davenport, Diag},
  journal={arXiv preprint arXiv:2606.19334},
  year={2026}
}

Paper · Models and dataset

license

Licensed under Business Source License 1.1 (BUSL-1.1); see LICENSE.

About

The fine print has a map now.

Resources

Contributing

Stars

Watchers

Forks

Releases

Used by

Contributors

Languages