Thanks for contributing.
This repository stores and generates Division and Jurisdiction YAML data for US local governments.
Don't know the difference between Divisions and Jurisdictions? Start with FAQ.md for conceptual explanation, then MODELS.md for technical details.
When you contribute to this project, your work directly improves the civic data infrastructure that powers transparency, research, and public engagement across the United States.
Here's what happens and why it matters:
- Your corrections and updates to this repo and division data become the authoritative source used by OpenStates.org and its API.
- Researchers, journalists, and civic tech developers rely on this data to track legislation, analyze government accountability, find local representatives and build tools that serve the public
- Your knowledge of your local government (boundaries, officials, contact information) fills critical gaps that automated systems can't solve
- The improvements you make help ensure that civic technology actually works for the communities it serves
Think of it like this: just as Open States volunteers understood that better data on their website meant better tools for their state's civic engagement, your contributions here create the foundation that makes all downstream civic tech work correctly.
If you know that a division or jurisdiction file contains incorrect or outdated information — wrong district boundaries, a renamed office, a bad URL — you can edit the relevant file directly under divisions/ or jurisdictions/ and open a pull request with your correction.
Your impact: Your local knowledge flows directly into OpenStates.org and its API. When you fix a contact URL, update district boundaries, or correct an official's name, journalists and civic technologists immediately get better data.
- Fork this repo
- On your forked repo, update a file under the
datafolder - Update the file, then
Commit changesviaCommit directly to the main branch. - Go back to your forked repo, "Contribute" -> "Open pull request"
- Follow the Pull Request Guidelines
- Click "Create pull request"
Need to understand the file structure? See MODELS.md for field definitions and examples.
Working with places? See FAQ: What is a place?.
Browse the issues tracker and pick up an issue. Labels marked as 'good first issue' are a good place to start.
Your impact: These issues often involve building tools or fixing processes that affect how hundreds or thousands of jurisdiction records are generated and validated. Your code changes improve the pipeline that feeds OpenStates' data infrastructure, making it faster, more reliable, and more comprehensive.
- Check for an existing issue related to your change.
- If no issue exists, open one describing the problem and proposed approach.
- Create a feature branch for your work.
- Understand the basics: Start with FAQ.md for conceptual questions about divisions and jurisdictions, then MODELS.md for technical details.
See README.md for full setup instructions. Quick commands:
uv venv .venv
source .venv/bin/activate
uv sync --all-extras- Keep changes focused and small.
- Add or update tests for code changes.
- Keep model contract changes in
src/models/explicit and discussed with maintainers. - Use
srcpackage-root imports (for examplefrom src.models.division import Division). - When modifying Division or Jurisdiction fields, ensure backward compatibility and update affected tests.
- For OCD ID changes, test against the full validation pipeline.
Run the checks below before opening or updating a PR:
uv run ruff check .
uv run pytest -m "not integration and not slow"If your change affects cross-module behavior, pipeline orchestration, or output artifacts, also run relevant integration tests.
For the full checklist, see ai_tools/system/pre-commit-checks.instruction.md.
When behavior or workflows change:
- Update
README.mdif setup/run guidance changed. - Update
MODELS.mdif Division, Jurisdiction, or OCD ID structure changed. - Update
FAQ.mdif conceptual definitions or understanding changed. - Update this file (
CONTRIBUTING.md) if contributor process changed. - Update
AGENTS.mdandai_tools/assets if agent workflow changed. - Record breaking changes in
CHANGELOG.md.
Include the following in your PR:
- Linked issue.
- Summary of what changed and why.
- Tests and validation commands run.
- Notes on data/output impact (for example
divisions/,jurisdictions/). - For model changes: Clear explanation of how the structure changed and backward compatibility considerations (see MODELS.md for current structure).
For contributions that change only YAML files in safe paths:
Safe paths for auto-merge:
divisions/**/*.{yml,yaml}jurisdictions/**/*.{yml,yaml}
Process:
- Create PR with YAML-only changes in safe paths
- Request reviewer approval
- ✅ Workflow auto-merges after approval
- ✅ Branch auto-deletes automatically
Important: If your PR includes any files outside these paths (code, config, docs), auto-merge is disabled and requires manual merge.
Documentation:
- YAML Auto-Merge Quick Reference — Quick overview for contributors
- YAML Auto-Merge Workflow — Technical details for maintainers
- README.md - Project overview and quick start
- FAQ.md - Conceptual questions (What's a division? What's a jurisdiction? Why both?)
- MODELS.md - Technical data model definitions with field-level details
- docs/data_model_relationships.md - Visual overview of how models connect
- CONTRIBUTING.md - This file: how to contribute (code, data, improvements)
docs/- Technical deep dives (OCD ID format, YAML structure, pipeline details)
Once your PR is reviewed and merged:
- Data updates (YAML files) are immediately available in this repository and automatically flow into OpenStates.org and its API on the next data update cycle
- Code improvements help the team maintain, scale, and improve the pipeline that generates and validates all jurisdiction and division records
- Your contribution is credited in the repository's git history and pull request records, creating a transparent record of who improved the civic data infrastructure
- Downstream users benefit — researchers running studies, journalists investigating government, civic tech developers building tools, and citizens looking up their representatives all get more accurate and complete data
The improvements you make are permanent infrastructure improvements. They don't disappear after one election cycle or get overwritten—they become part of the foundation that civic technology builds on.
Open an issue and tag maintainers if you are unsure about scope, data modeling, or output conventions.
- Census Fips Codes - Census FIPS Codes — Federal Information Processing Standards (FIPS) codes are numeric identifiers assigned by the US Census Bureau to uniquely identify geographic and political entities. Every state has a 2-digit FIPS code, and every county has a 5-digit code (2-digit state + 3-digit county).
- Open Civic Data (OCD) — standard identifiers and schemas for political divisions; the OCD-ID format is used throughout this repo
- US Census Bureau TIGER/Line — authoritative geographic boundaries for counties, municipalities, districts, and more ArcGIS Hub — aggregates open geospatial datasets from governments and agencies, often the source for local boundary files