This package provides a way to calculate metrics for police traffic stops in Illinois. Built for use with data provided from the Illinois Traffic Stop Study.
Check out the Illinois traffic stops website to learn more.
You can install with pip
:
pip install itssutils
Download raw data from this link (you can download pre-processed metrics files there as well).
Process the raw data using the RawITSSData
class.
from itssutils.itssdata import RawITSSData
raw = RawITSSData()
raw.load_single_year(2017, '2017_ITSS_Data.txt')
You can calculate metrics using the ITSSMetrics
class.
from itssutils.itssdata import ITSSMetrics
met = ITSSMetrics(raw)
met.calculate_metics(['AgencyName', 'DriverRace'])
Try opening up the getting started notebook and working your way through it to see what the package can do. Be sure to note any issues!
Look for more documentation on the GitHub Pages site.