Name: ucr-clearance-parser
Owner: NPR visuals team
Description: parse uniform crime reporting clearance data
Created: 2015-03-10 21:01:46.0
Updated: 2017-07-11 19:23:56.0
Pushed: 2015-10-02 18:07:44.0
Homepage: null
Size: 7201
Language: Python
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
The UCR Clearance Parser powers the NPR Visuals crime clearance lookup tool by processing raw FBI UCR clearance data and generating an agency lookup file and JSON files for each law enforcement agency.
Requires PostgreSQL. See the NPR Visuals guide to set up a Mac development environment with PostgreSQL.
install -r requirements.txt
submodule update --init
ocess.sh
This generates approximately 22,000 JSON files of the form <ori7>.json
(e.g. NY03030.json
) and agency_names.csv
in the output
directory.
Requires AWS environment variables to be set.
ploy.sh
write_clearance_json()
in parse.py
– is quite ugly. If you need to extend the JSON output, consider refactoring this function. Pull requests encouraged!parse()
function parse.py
is a handy, fast parser for raw FBI UCR clearance data files, known as “master” files.data/UCR52406-2013.txt
is the FBI master agency list as exported from the UCR system. It was not used in our final product, but might be useful.MIT licensed, see LICENSE for details.