sc3 / cook-convictions-data

Django project for loading, cleaning and querying data about criminal convictions in Cook County, Illinois
4 stars 4 forks source link

Simplify convictions_data/statute.py #3

Open ghing opened 10 years ago

ghing commented 10 years ago

This is related to https://github.com/sc3/cook-convictions/issues/35. Now that https://github.com/sc3/python-iucr/issues/3 is implemented, allowing lookup of ILCS references that include subsection bits, see if we can simplify/clean up the code in convictions_data/statute.py and code more of the statutes in our dataset.

Ulitmately, if the parsing code seems simple enough or it's easy to abstract it to different ILCS formats, we could move this to the iucr package to close https://github.com/sc3/python-iucr/issues/8, though that still seems like a low priority to me.

bepetersn commented 10 years ago

Some of the functionality currently in statute.py should be pushed into the ilcs package. See the issue from that repo: https://github.com/sc3/python-ilcs/issues/2

bepetersn commented 10 years ago

Also related to this, iterate over the ILCS and ILRS codes we currently aren't matching to try to improve our regexes / parsing: #7.