UI-Research / mobility-from-poverty

https://ui-research.github.io/mobility-from-poverty/
4 stars 1 forks source link

Iss213 -- juvenile arrests #295

Closed vpancini closed 3 months ago

vpancini commented 4 months ago

This PR contains the files necessary to create the safety metric rates of reported juvenile arrests per 100,000 juveniles for 2021-2022. For each geographic level (county and place) there are two files (four files to review total):

For each geographic level, you must run the first file before running the main (second) file. The first file links our main data source, which is at the police agency level, to the appropriate geographic level (county or place). The main file then creates the actual metric. Note that 01_agency_geo_county.Rmd and 01_agency_geo_place.Rmd are exactly the same as the files of the same names for the reported crime metric, so if you are reviewing that metric as well, you should only review this set of files once.

Note that the sections of the main files that read in the data take a while to run, and the reviewer is welcome to make the code for those sections more efficient if possible. (They took especially long to run when I was attempting to run 2014-2022 data. They are more manageable with just two years, but future years will continue to make the run time lengthy for those sections.)

I also welcome the reviewer to add more validation steps/checks/assertive statements throughout the program. I wrote a validation section, explained the logic of my code and results throughout, and (manually) checked my results against the results from the 2021 update of the metric, but the more validation the merrier.

The final data files created by the main programs are stored in the final folder. All data and external files used in or created by all four programs used to create this metric are available on Box here. Please reach out to Vincent on Slack with any questions.