Skip to content

aclu-national/covid-decarceration-and-crime

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Crime During COVID-19

COVID-19 presents an enormous risk to those in carceral facilities and their surrounding communities. The ACLU Analytics team demonstrated just how dangerous the COVID-19 pandemic could be for incarcerated people in April after building an epidemiological model that illustrated the deadly threat of COVID-19 in jails. Since then, some governors, sheriffs, and judges made the decision to shift detention policies to prioritize protecting the lives of those who live and work in jails and prisons.

The release of incarcerated people from jails has saved lives in both jails and in communities. To quell concerns that decarceration has had any negative effect on the surrounding communities, the ACLU Analytics team analyzed crime trends and jail populations in 29 localities. Nearly every county jail examined reduced their population during the COVID-19 pandemic, and the size of the reduction in jail population was functionally unrelated to crime trends in the following months (March - May 2020). The team found no evidence of spikes in crime in areas that reduced their jail population, even when comparing monthly trends over the past two years. The release of incarcerated people from jails has saved lives, all while monthly crime trends remained within or below average ranges in every city.

This repo contains the code we used to clean, analyze, and visualize crime trends and decarceration efforts during COVID-19. Our results are discussed here.

Data Sources

See here for sources of crime and jail population data. This analysis was conducted in July of 2020 — because police data is dynamic and sometimes subsequently updated based on new reports, incident counts may have changed since the time of analysis.

Repository Structure

The repository is structured into several folders as follows:

  • 📂 scripts : Core scripts, run in sequential order, used as part of the cleaning and analysis process
    • 📃 01a-crime-data.R : Reads in 29 cities worth of crime data from AWS S3 bucket. Cleans all of them such that they have the relevant required columns depending on type (incident level, offense level or month level).
    • 📃 01b-crime_categorization_assumptions.R: Categorizes all crime cities data such that we only look at UCR's "Part One" crime types. This file sources in 01a-crime-data.R.
    • 📃 02-decarceration_data.R: Reads in jail population data from Vera. Where counties don't have jail population data, we cite different news sources for estimates of jail pop.
    • 📃 03-location_data.R : Reads in relevant census data from the cities covered in the analyses.
    • 📃 04_analysis.R : Bind, joins and shapes data across cities in right format to visualize. Calculates crime rates/raw crime numbers per month as well as percent changes in crime from same time period last year. This file sources all prior files (01* - 03)
    • 📃 05-viz.R : Visualizations created for publication. This file sources all prior files (01* - 04).
  • 📂 code : Functions which are sourced into 📁 scripts
    • 📄 aaa_onLoad.R : Package and credentials loading for all files. Package dependencies can be found here.
    • 📄 custom_theme.R : Set up custom theme for plots, based on our internal custom themes
    • 📄 global_variables.R : Useful pre-assigned variables used in later scripts
    • 📄 utils-cli.R : Functions for printing to the cli.
    • 📄 utils-diagnostics.R : Quick informal plot/tests for datasets
    • 📄 utils-misc.R : Random misceallaneous convenience functions
    • 📄 utils-validation.R : Formal dataset tests for the core crimes datasets
  • 📁 graphics : Outputs produced by the visualizations files in scripts

Instructions for Non-ACLU Staff

We use an internal package called LibLabTemplates that we've unwound from this repository in advance of public release. The only remaining component is the use of config files, which is essentially a simple use of the config package to store credentials.

To run this code, you'll need to change the following code block to your own code:

# setup of tidycensus and other config parameters
my_config <- LibLabTemplates::get_my_config_file()

### NOTE YOU WILL NEED TO USE YOUR OWN KEYS BELOW
Sys.setenv(
  "AWS_ACCESS_KEY_ID" = my_config$aws_access$AWS_ACCESS_KEY_ID,
  "AWS_SECRET_ACCESS_KEY" = my_config$aws_access$AWS_SECRET_ACCESS_KEY,
  "AWS_DEFAULT_REGION" = "us-east-1",
  "CENSUS_API_KEY" = my_config$census$CENSUS_API_KEY
)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages