sc3 / python-iucr

Python package for working with Illinois Uniform Crime Reporting (IUCR) data.
3 stars 4 forks source link

Missing sections in the IUCR crosswalk? #4

Open bepetersn opened 10 years ago

bepetersn commented 10 years ago

I found the following section in the Cook County Jail data, but not in our IUCR crosswalk:

625-5/4-103.2

This section exists, and is visible in the online ILCS reference, if you scroll down sufficiently. But it is not in our IUCR crosswalk document. Instead, only the following section exists:

625-5/4-103

Now, we could add this example to our dataset. Maybe we should see if there are other missing sections from the IUCR crosswalk we have, based on the two datasets we have available, and try and add them all?

ghing commented 10 years ago

There are some missing mappings and IUCRs in the PDF that I used to make the original crosswalk CSV. We should add any missing values to our crosswalk.

There are additional IUCR codes listed in https://data.cityofchicago.org/Public-Safety/Chicago-Police-Department-Illinois-Uniform-Crime-R/c7ck-438e that we can also add, but we'll have to figure out the corresponding ILCS reference.

It looks like the lookup table that I used initially only had the top-level IUCR codes.

For instance, it has IUCR 2010 as Manufacture/Deliver narcotics, but not 2011, 2012, etc. - the IUCRs for manufacture/deliver of specific types of drugs. It would be a big help to create these mappings, even if we have to look up the ILCS references ourselves.

bepetersn commented 10 years ago

I can see the appeal to adding more IUCR codes, if for no other reason than completeness. However, from at least one perspective, I'd prefer not to. I see IUCR codes as offering a more broad categorization of crimes -- that's the reason I'd use this project in conjunction with the jail data, for instance -- to classify crimes, and then be able to eventually even say "non-violent vs. violent".

In looking at the dataset, though, I also noticed the "offense_category" field. Maybe that is what I want. But anyway, I'm just thinking in terms of use cases.

bepetersn commented 10 years ago

One possibility would be to make the IUCR code an int. So that for instance, for the homicide category, you would be able to say:

homicide = Convictions.objects.filter(iucr_code__gte=110).filter(iucr_code__lte=190)

bepetersn commented 10 years ago

Another ILCS ref to be added:

720-5/26-1(a)(1)