Dataset Viewer

The dataset viewer is not available because its heuristics could not detect any supported data files. You can try uploading some data files, or configuring the data files location manually.

USSC Federal Sentencing Database

Federal sentencing records from the U.S. Sentencing Commission (USSC) for fiscal years (FY) 2002–2025. Start with sentences for recorded demographics, offenses, guideline ranges and sentence outcomes; related tables describe counts of conviction, drugs and guideline calculations. Use v_sentence_terms for documented prison-term measures, because raw sentence fields contain special codes. The 1,720,684 sentencing rows include a retained source duplicate and are not a cross-year person register.

Start querying

Preview up to five sentencing records with a stated prison term longer than 120 months (10 years). fiscal_year is the sentencing reporting year and prison_months is the term length; term_type = 'months' excludes separately coded life, death and unspecified terms.

Choose R or Python. Install the datapond package once: use install.packages("datapond") in R, or run python -m pip install datapond in a terminal.

R

library(datapond)
con <- dp_connect("ussc")
tryCatch({
  DBI::dbExecute(con, "SET threads=1")
  DBI::dbExecute(con, "SET memory_limit='128MiB'")
  DBI::dbExecute(con, "SET max_temp_directory_size='0B'")
  print(DBI::dbGetQuery(con, "SELECT fiscal_year,prison_months,term_type FROM v_sentence_terms WHERE term_type='months' AND prison_months>120 LIMIT 5"))
}, finally = dp_disconnect(con))

Python

import datapond
con = datapond.connect('ussc')
try:
    con.execute("SET threads=1")
    con.execute("SET memory_limit='128MiB'")
    con.execute("SET max_temp_directory_size='0B'")
    print(con.execute("""SELECT fiscal_year,prison_months,term_type FROM v_sentence_terms WHERE term_type='months' AND prison_months>120 LIMIT 5""").fetchall())
finally:
    con.close()

Queries run on your computer and read the byte ranges they need. A small result can still require a large scan. These examples limit DuckDB to one thread and a 128 MiB buffer pool with disk spill disabled; that is not a limit on the entire R or Python process. Larger analyses may need more memory or a local download with enough disk space.

Tables and record units

13,962,089 rows across nine tables, including 1,720,684 sentencing records. sentences is a wide table: many fields describe one sentencing record. Related long tables put each repeated count of conviction, guideline computation, drug type or stated departure/variance reason on its own row. A source “slot” is the numbered position of a repeated item; “scalar” means a single-value field.

Table Description Row Count Column Count
sentences One row per federal sentencing source record in the fiscal year: demographics, offense, guideline range, sentence imposed, departures (single-value fields of the USSC individual offender datafile) 1,720,684 1610
counts One row per count of conviction: statute (TTSC1/TTSC2/TTSC3 = title/section/subsection), statutory minimum/maximum (SMIN/SMAX) and STA1-3 2,412,926 11
guidelines One row per guideline computation on the case: base offense level, specific offense characteristics and Chapter 3 adjustments (ADJ_*), per-guideline totals 1,706,580 348
drugs One row per drug type involved: type, weight, units, equivalency (DRUGTYP, WGT, UNIT, MWGT, DRGAM, ...) 749,098 14
departure_reasons One row per stated reason for departure/variance: REAS code + RETEXT text (FY2004+, post-Booker coding) or REASON + REASTXT (FY2002-03, pre-Booker coding) 2,637,999 7
pleas One row per recorded plea/verdict entry (INPLEA, INNOPL) 738,024 5
chapter_text Free-text chapter 2/3/4 guideline notes (CHP2TXT/CHP3TXT/CHP4TXT) and change flags 215,883 9
new_statutes Statutes of conviction as recorded in NWSTAT slots 3,279,305 4
offense_dates Offense begin/end dates per slot (OFBEG/OFEND; FY2002-era files only) 501,590 5

See the data dictionary for column definitions.

Joining records and choosing sentence measures

Join related tables on fiscal_year and USSCIDN; each long-table row also has seq, its source slot number. Empty slots are omitted, and seq is an ordering value, not a comparable measure across years. USSCIDN is unique within a fiscal year only, apart from the retained duplicate: the FY2010 record with USSCIDN 1325685 appears twice.

v_sentence_terms keeps the sentencing-record unit while separating ordinary prison months from special categories such as life, death and prison with no term stated. Its prison_imposed indicator comes from PRISDUM. Do not average raw TOTPRISN: 9992, 9996, 9997 and 9998 are special codes, and zero can mean either no prison or a term shorter than one month. Use term_type = 'months' for ordinary term averages.

The aggregate below excludes missing PRISDUM values from the prison-imposed percentage; decide and report that denominator explicitly. Missing fields can reflect year-specific collection: check the codebook before comparing fiscal years. Departure and variance fields preserve the Commission’s reason codes and accompanying text; use its codebook to interpret those categories.

More example queries

Summarize sentencing records by fiscal year. The defendants output column counts sentencing records, including the retained FY2010 duplicate, not distinct people. pct_prison_imposed is a percentage among known prison indicators; mean_months_when_term_stated averages only ordinary month-denominated terms. life counts separately coded life terms. This direct DuckDB connection is an alternative to datapond.

INSTALL httpfs; LOAD httpfs;
ATTACH 'https://huggingface.co/datasets/Nason/ussc-database/resolve/main/ussc.duckdb' AS ussc (READ_ONLY);

SELECT fiscal_year, COUNT(*) AS defendants,
       ROUND(100.0 * COUNT(*) FILTER (WHERE prison_imposed) / COUNT(*) FILTER (WHERE prison_imposed IS NOT NULL), 1) AS pct_prison_imposed,
       ROUND(AVG(prison_months) FILTER (WHERE term_type = 'months'), 1) AS mean_months_when_term_stated,
       COUNT(*) FILTER (WHERE term_type = 'life') AS life
FROM ussc.v_sentence_terms GROUP BY 1 ORDER BY 1;
-- TOTPRISN alone is neither averageable (9992/9996/9997/9998 are codes) nor a prison
-- indicator (0 = no prison OR under one month); the view separates both.

Sources and maintenance

Sources and build documentation

Source: U.S. Sentencing Commission. License: Public domain.

The Commission publishes fixed-width individual-offender datafiles with about 22,000 variables. The build reshapes them into the sentences table and related tables described above.

Build pipeline, the USSC codebook and caveats: https://github.com/ian-nason/ussc-database Source: https://www.ussc.gov/research/datafiles/commission-datafiles (public domain).

R with DBI and duckdb

Install the dependencies once with install.packages(c("DBI", "duckdb")).

library(DBI)
con <- dbConnect(duckdb::duckdb())
dbExecute(con, "INSTALL httpfs")
dbExecute(con, "LOAD httpfs")
dbExecute(con, "ATTACH 'https://huggingface.co/datasets/Nason/ussc-database/resolve/main/ussc.duckdb' AS ussc (READ_ONLY)")
dbGetQuery(con, "SELECT fiscal_year FROM ussc.v_sentence_terms LIMIT 5")
dbDisconnect(con, shutdown = TRUE)

DuckDB uses HTTP range requests; queries run on your machine and may need substantial memory or download data. A LIMIT does not guarantee a small scan.

Or with the datapond packages: pip install datapond / pak::pak("datapond-db/datapond-r").

Build pipeline, the USSC codebook and caveats: https://github.com/ian-nason/ussc-database Source: https://www.ussc.gov/research/datafiles/commission-datafiles (public domain).

Downloads last month
188