UI-Research / mobility-from-poverty

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

Iss212 #292

Closed vpancini closed 4 months ago

vpancini commented 4 months ago

This PR contains the files necessary to create the safety metric rates of reported violent crimes per 100,000 people and rates of reported property crimes per 100,000 people for 2021-2022. For each geographic level (county and place) there are two files:

  1. 01_agency_geo_county.Rmd / 01_agency_geo_place.Rmd
  2. reported-crime-county-all.Rmd / reported-crime-county-all.Rmd

For each geographic level, you must run the first file before running the main 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 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.

All data and external files used in or created by these files is available on Box here. Please reach out to Vincent on Slack with any questions.