Democracy Monitor

Monitoring democratic institutions through public records

← Back to overview

Data

Democracy Monitor is open data. All assessment results, source documents, and computed metrics are available for download and programmatic access.

CSV Downloads#

Weekly Aggregates

One row per category-week with flattened structural, AI, thematic, and concern metrics.

Download CSV

Document Scores

One row per scored document with keyword matches, severity scores, and document class.

Download CSV

Every column in both CSVs is documented in the data dictionary.

Document counts for the court-record categories are computed from a single documented counting rule applied uniformly to all periods (the counting_scope flag in the documents table), so they are directly comparable across the February 2026 collection change.

Full Database#

For developers and researchers who need the complete dataset, a PostgreSQL dump is available for download. The dump is a single pg_dump -Fc file including all tables (~6 GB): source documents, AI assessments, weekly aggregates, baselines, narratives, vector embeddings, and the tracked federal litigation cases (tracked_cases — one row per case with court, filing/termination dates, and category routing; as of August 2026 this table replaces the ~283,000 docket-entry stub rows formerly in documents). Updated weekly.

Key tables for researchers

Column-level documentation for all seven tables is in the data dictionary.

TableDescription
documentsSource documents with metadata, content, source type. counting_scope = false marks judicial opinions outside the documented counting population (v1 classifier: SCOTUS; circuits/D.D.C. on executive-power phrases) — stored and assessed, but excluded from counts and statistics for cross-era consistency
ai_document_assessmentsPer-document AI review (P1 flag, P2 classification, reasoning, prompt_version)
weekly_aggregatesCategory-week rollups with structural/AI/thematic/concern scores
baselinesHistorical baseline statistics (eight cycle-year periods: Trump 2017–2020, Biden 2021–2024)
narrativesAI-generated weekly and term summaries
document_scoresPer-document keyword assessment scores
tracked_casesFederal litigation case tracker: one row per case (cl:<docketId>, joinable to documents.case_id) with court, filing/termination dates, status, posture, and category routing

Setup

# Automatic (recommended)

createdb democracy_monitor

pnpm db:init --force

# Manual

curl -LO https://democracymonitor.us/api/data/dump

pg_restore --clean --if-exists --no-owner -d democracy_monitor dump

pnpm db:migrate

See DEPLOYMENT.md for full setup instructions. Schema is defined in lib/db/schema.ts.

API Endpoints#

EndpointParamsDescription
/api/export/weeklyformat (csv|json), category, from, toWeekly aggregate data per category with structural/AI/thematic scores
/api/export/scoresformat (csv|json), category, from, toPer-document keyword assessment scores with match details

All endpoints default to JSON. Add ?format=csv for CSV output with flattened columns (no JSON blobs).

CSV Column Reference#

Full field-level documentation for both CSV exports — every column's meaning, derivation, and caveats — lives in the data dictionary (machine-readable at /api/export/dictionary). The dictionary is generated from the same registry the export code is tested against, so it cannot drift from the actual columns.

Rate Limits#

Export endpoints are rate-limited to 1 request per second per IP address. Responses include a Retry-After header when throttled.