Skip to content

joeytang202/codecheck_LangtonRuiterVerlaan2022

Repository files navigation

About

These materials reproduce the findings from a journal paper published in Police Practice and Research which explored police deployment time in response to emergency calls for service using data from Detroit, United States.

Steps for reproduction in R

  • Download or clone this GitHub repository to your local machine.
  • Download the data files from the corresponding OSF repository and save them in the data folder1.
  • Open the demand_viz.Rproj project file. This will launch RStudio.
  • Package versions are managed by renv. Execute renv::restore() to install the required packages in the virtual environment. You might have to install lorenzgini manually from GitHub -- see comments within the scripts.
  • The two scripts in the scripts folder can be used to reproduce the paper's findings. Both scripts are almost identical: one for the raw counts/total deployment time, one for the time spent on scene2.
  • Running these scripts will generate and save tables and figures in the results and visuals folders, respectively.
  • Render results_summary.Rmd to summarize these findings in a single document.

Contact

If you have any questions about running the scripts or the paper itself, please get in touch.

Footnotes

  1. Since publication, the calls for service data used in the paper were removed from the Detroit Police Department open data portal and replaced with comparable -- but differently structured -- data files for individual years. Hence, the raw data used for analysis has been uploaded to OSF. For ease, the same has been done for the geo data.

  2. As evident in the commit history, minor changes were made to the code after publication to remedy new code errors caused by a lack of package versioning. Since then, renv has been used and it should avoid these problems going forward.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published