Upload README.md with huggingface_hub
Browse files
README.md
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: other
|
| 3 |
+
task_categories:
|
| 4 |
+
- tabular-classification
|
| 5 |
+
- tabular-regression
|
| 6 |
+
tags:
|
| 7 |
+
- sentencing
|
| 8 |
+
- criminal-justice
|
| 9 |
+
- federal-courts
|
| 10 |
+
- ussc
|
| 11 |
+
- duckdb
|
| 12 |
+
- datapond
|
| 13 |
+
pretty_name: U.S. Sentencing Commission Individual Offender Database (FY2002-FY2025)
|
| 14 |
+
size_categories:
|
| 15 |
+
- 10M<n<100M
|
| 16 |
+
---
|
| 17 |
+
|
| 18 |
+
# USSC Federal Sentencing Database
|
| 19 |
+
|
| 20 |
+
Every federal defendant sentenced from FY2002 through FY2025 (1.72M), from the U.S.
|
| 21 |
+
Sentencing Commission's public individual offender datafiles: demographics, offense
|
| 22 |
+
of conviction, guideline calculations, sentence imposed, departures and variances.
|
| 23 |
+
The Commission's ~22,000-variable fixed-width layout is reshaped into a wide
|
| 24 |
+
`sentences` table plus long tables per count of conviction, guideline computation,
|
| 25 |
+
drug type and departure reason.
|
| 26 |
+
**13,962,089 rows across 9 tables.**
|
| 27 |
+
|
| 28 |
+
| Table | Description | Row Count | Column Count |
|
| 29 |
+
|---|---|---|---|
|
| 30 |
+
| `new_statutes` | Statutes of conviction as recorded in NWSTAT slots | 3,279,305 | 4 |
|
| 31 |
+
| `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 |
|
| 32 |
+
| `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 |
|
| 33 |
+
| `sentences` | One row per federal defendant sentenced in the fiscal year: demographics, offense, guideline range, sentence imposed, departures (scalar variables of the USSC individual offender datafile) | 1,720,684 | 1610 |
|
| 34 |
+
| `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 |
|
| 35 |
+
| `drugs` | One row per drug type involved: type, weight, units, equivalency (DRUGTYP, WGT, UNIT, MWGT, DRGAM, ...) | 749,098 | 14 |
|
| 36 |
+
| `pleas` | One row per plea/verdict slot (INPLEA, INNOPL) | 738,024 | 5 |
|
| 37 |
+
| `offense_dates` | Offense begin/end dates per slot (OFBEG/OFEND; FY2002-era files only) | 501,590 | 5 |
|
| 38 |
+
| `chapter_text` | Free-text chapter 2/3/4 guideline notes (CHP2TXT/CHP3TXT/CHP4TXT) and change flags | 215,883 | 9 |
|
| 39 |
+
|
| 40 |
+
## Query it remotely
|
| 41 |
+
|
| 42 |
+
```sql
|
| 43 |
+
INSTALL httpfs; LOAD httpfs;
|
| 44 |
+
ATTACH 'https://huggingface.co/datasets/Nason/ussc-database/resolve/main/ussc.duckdb' AS ussc (READ_ONLY);
|
| 45 |
+
|
| 46 |
+
SELECT fiscal_year, COUNT(*) AS defendants,
|
| 47 |
+
ROUND(AVG(TOTPRISN), 1) AS avg_prison_months -- 0 for probation-only
|
| 48 |
+
FROM ussc.sentences GROUP BY 1 ORDER BY 1;
|
| 49 |
+
```
|
| 50 |
+
|
| 51 |
+
Or with the datapond packages: `pip install datapond` / `pak::pak("datapond-db/datapond-r")`.
|
| 52 |
+
|
| 53 |
+
Build pipeline, the USSC codebook and caveats: https://github.com/ian-nason/ussc-database
|
| 54 |
+
Source: https://www.ussc.gov/research/datafiles/commission-datafiles (public domain).
|