Skip to content

Latest commit

 

History

9 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

Louisiana DPSC Data

This repository loads, combines, and cleans public datasets released by the Louisiana Department of Public Safety & Corrections (DPSC). It pulls raw files directly from the DOC website, connects categorical codes using the official codebook, and produces analysis-ready dataframes across six data types.


Overview

As of May, the Louisiana DPSC publishes several datasets on incarceration, supervision, and mortality. This pipeline automates the full process of:

  1. Downloading raw CSVs and Excel files directly from doc.la.gov.
  2. Combining files across time periods into unified dataframes.
  3. Decoding coded fields (race, offense, parish, facility, supervision type) via the official codebook.
  4. Cleaning and standardizing dates, sentence lengths, flags, and demographics.
  5. Saving both raw and processed outputs as .rds files.

Data Sources

All files are downloaded directly from the Louisiana DPSC website. The pipeline currently covers:

Dataset Period Covered Description
Incarceration Snapshots Dec 2025 – Mar 2026 Monthly point-in-time views of the incarcerated population
Admissions 2019 - 2025 All prison admissions by year
Releases 2016 – 2025 All prison releases by year
Probation & Parole Snapshot Feb 2026 Point-in-time supervised population
Deaths 2018 - 2025 In-custody deaths with cause
Facility Census Jan 2025 – Mar 2026 Monthly headcounts by facility and custody type
Codebook Latest Official lookup tables for all coded fields

Output Files

Raw (raw/)

Unmodified data as downloaded, stored as named lists of dataframes:

  • snapshot.rds
  • admit.rds
  • release.rds
  • pp.rds
  • death.rds
  • census.rds

Processed (processed/)

Cleaned, decoded, and analysis-ready dataframes:

File Key Variables
snapshots_clean.rds Location, race, sex, age, sentence length, offense, flags
admits_clean.rds Admission date, parish, race, sex, sentence type, time-to-release estimates
release_clean.rds Admission/release dates, years served, offense, release reason
pp_clean.rds Supervision type, admission/end dates, offense, flags
deaths_clean.rds Death date, cause, race, gender, years until death
census_clean.rds Prison, custody type, facility, monthly population counts

Key Cleaning Notes

  • Dates are parsed from multiple formats (YYYYMMDD, YYYY-MM-DD, MM/DD/YYYY) via a unified parse_mixed_date() function.
  • Sentence lengths are decoded from a packed 7-digit format (YYYMMdd -> years + months/12 + days/365.25).
  • Flags (sex_offender, violent, habitual) are standardized from "X" markers to logical TRUE/FALSE.
  • Offense, race, parish, and location codes are replaced with human-readable literals via codebook join.
  • Census files are cleaned into a tidy facility-level format.

About

No description, website, or topics provided.

Resources

Stars

4 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages