# The Texas Cannabis Ledger methodology

A public-interest data project by StackSwap.ai · Audited September 3, 2026

## Evidence and editorial position

All dashboard counts, rates, shares, changes, and county comparisons are calculated from the normalized public records described below. StackSwap's stated support for regulated adult-use legalization, an end to criminal penalties for adult possession, and meaningful record-clearing relief is an editorial position. It does not alter the source data, inclusion rules, missing-data treatment, or calculations.

The Ledger's shorthand “marijuana arrests” means marijuana-coded criminal-history arrest records in the cited Texas DPS workbook. It is not necessarily a count of unique people or unique arrest events. A person may appear under more than one offense code, and an arrest record does not establish guilt or conviction.

These statistics reflect records reported to the Texas criminal-history system and may change as criminal-justice agencies submit or correct records.

## Inputs

1. Texas Department of Public Safety, County Arrest Records: 2023–2025, published January 2026.
2. U.S. Census Bureau, Vintage 2025 annual county population estimates.

## Transformation

- Read the DPS workbook using its two-row year/adult-juvenile header.
- Retain only offense rows whose offense or statute text contains `MARIJ` or `MARIHUANA`.
- Classify a retained row as possession when it cites Texas Health & Safety Code §481.121 or explicitly labels marijuana possession. Classify remaining retained rows as other marijuana offenses.
- Sum adult and juvenile columns by county, category, and year.
- Preserve whether at least one matching DPS row exists for each county-year. A county-year with no matching row is marked `no_matching_row`; it is not presented as a reported zero and is excluded from statewide derived rates.
- Calculate rate per 100,000 as reported marijuana-coded records divided by the Census annual county population estimate, multiplied by 100,000. This is a population-normalized comparison; the county table does not establish that the people represented were county residents.
- Assign comparative rate ranks only to counties with at least 10,000 residents. Calculated rates remain visible for smaller counties, but are labeled not ranked because county-reported arrests may include nonresidents and a very small resident denominator can produce an extreme figure.
- Build map colors as within-year, within-measure county quintiles. The printed legend changes when the year or measure changes.

## Privacy

The pipeline ingests aggregate county/offense tables only. It does not ingest names, addresses, case numbers, charge narratives, or person-level records.

## Independent comparison

The independently recomputed 2025 DPS criminal-history total is 41,701 marijuana-coded records, including 41,049 classified as possession. The Marijuana Policy Project reports 29,496 Texas cannabis arrests, including 28,753 possession arrests, using FBI-derived data. The difference is 12,205 in the totals and 12,296 in the possession figures. The Ledger does not force these systems to agree: their definitions, coverage, submission practices, and counting units can differ.

See `/data-integrity.md` for the complete source-to-render audit.

## Reproduction

Run `scripts/ingest.py` with Python, pandas, and openpyxl. It downloads the two authoritative workbooks and writes `src/data/enforcement.json`. Review source layouts when adding a new annual release; the parser intentionally fails rather than guessing when expected headers change.
