Skip to content

utdata/rwd-police-agencies

Repository files navigation

output knit
html_document
df_print
paged
(function(inputFile, encoding) { rmarkdown::render( inputFile, encoding = encoding, output_dir = "docs", output_file='index.html' ) })

Texas police agencies

This repo gets a list of police agencies for a public information request assignment.

As of this writing in January 2022, the most recent data is 2020 and is found through the FBI's Crime Data Explorer.

  1. Go to the Crime Data Explorer
  2. Click on the Crime data explore downloads from the menu.
  3. Scroll to Crime in the United States Annual Reports.
  4. Choose Police Employee Data from the dropdown, along with the year
  5. Click the Download button

This gives you a zip file with a ton of data including folders called Table XX State Cuts, with XX being a number between 78 and 81.

  • 78 is City Agencies
  • 79 is University and College Agencies
  • 80 is County Agencies
  • 81 is State, Tribal, and Other Agencies

The Texas files were pulled from the archive and put in the data-raw folder. The download does include full nation files for each table that could be used instead if states other than Texas were desired.

See the following notebooks for more:

Work on this project was enabled by the album Here in the Black - Live at Hollywood Forever Cemetery by Gary Numan.

Previous work

The file structure of the repo was changed in January 2022 so previous work will fail but it is retained for posterity.

Data processing

  • data/pe_1960_2018.csv is the original file, but it is not in the repo because it is too big (192MB). It was downloaded from FBI Crime Data Explorer under Police Employee Data. The file href at the time was this.
  • RStudio could not open the original file (there were errors), so I used csvkit to cut down the file to versions for Texas and Texas in 2018. See the 01-file-process.ipynb notebook, which requires Jupyter Notebooks and the python package csvkit.
  • 02-tx-2018.Rmd is an RNotebook that explores the Texas agencies. Published version.
  • 02-tx-all.Rmd starts to look at all years, but isn't really relevant at this point.

About

Cutting and sorting a list of law enforcement agencies in Texas.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published