Management command to export most common charge by community area
Rename export_csv to export_public_data

Rename export_csv management command to export_public_data to
more clearly describe its functionality.

Sort exported results by case_number.
Fix sorting of public data

Fix where the sort happens and do a secondary sort on sequence
number.
Improve most common statute query

Use LOWER() to do some simple deduping.

Use Min() to grab a single charge description without a separate
query.
Add management command to export top statutes overall
Add function to remove attempted offense statute

Add a function to remove the statutes for attempted offenses
from statute citation strings.  This should make it easier to
parse statutes for looking up IUCR codes.

Add a management command to export a CSV of all statutes that
seem to have the attempted offense statutes in them to help
prepare test cases.
Better statute parsing

Improve statute parsing to assign IUCR codes, descriptions and
category more Disposition and Conviction records.

Strip out the part fo the statute that
identifies the crime as attempted, conspiracy or solicitation.

Improve the regexes used for parsing statues and
make a cleaner API for parsing the statute that tries to do
less in each function.

Make a lookup table to correct badly formed statutes in cases
where trying to fix the regex is too difficult or impossible.

Make use of the functionality that Brian
added to python-iucr that tries to look up the statute with
varying numbers of subsection bits.
Add County spatial data

Add a County model to hold County data from the TIGER shapefile.

Added an ``in_cook_county`` flag to the ``CensusPlace`` model.

Add a ``flag_cook_county_places`` management command to set the
``is_cook_county`` flag on CensusPlaces that intersect Cook County.

Renamed ``export_chicago_geojson`` management command to
``export_border_geojson``.   Updated the command to load the Chicago
boundary from the ``CensusPlace`` model instead of trying to aggregate
it from the border of the community areas.  Updated the command to add
both Cook County and Chicago's boundaries in the GeoJSON.

Update README to reflect all of this.

Addresses https://github.com/sc3/cook-convictions/issues/133
Better identification of places in Cook County

The updated spatial queries eliminate places that touch but
don't overlap the border of Cook County.

Addresses https://github.com/sc3/cook-convictions/issues/133
Better Chicago and Cook County borders

Rename the ``chicago_geojson_from_shp`` management command
``border_geojson_from_shp`` and update it to take a second
argument for a Cook County shapefile.

Update the command to use the cartographic shapefiles as they
remove the offshore areas of Chicago and Cook County.

Update the README to reflect the new command name, the additional
argument and the new datasets.

Addresses https://github.com/sc3/cook-convictions/issues/133
Merge branch 'master' into better_iucr_code_detection
Update loading of final statute and IUCR fields

Add final_statute_formatted field to the Disposition and Conviction
model.

Add a format_statute() function to format the parsed statute that will
go into final_statute_formatted.

Factor final_statute field population out into a method,
load_final_statute.

Remove trailing whitespace from files edited in this commit.

Rename statute2iucr management command to load_final_statute_and_iucr to
reflect these changes.

Fix statute.strip_surrounding_parens to handle empty string

Addresses https://github.com/sc3/cook-convictions-data/issues/7,
https://github.com/sc3/cook-convictions/issues/83
Add statute-based queries

Add statute-based queries to group together violent, nonviolent,
affecting women and drug crimes (and index crimes within each)
to handle cases where an ILCS statute doesn't map to an IUCR code
or the mapping is ambiguous.

Addresses https://github.com/sc3/cook-convictions/issues/83,
https://github.com/sc3/cook-convictions-data/issues/7,
https://github.com/sc3/cook-convictions-data/issues/6
Queries to help analyze charge class of cases

Populate the final_statute, final_chrgdesc, final_chrgtype,
final_chrgclass and IUCR-related fields after all the other fields have
been loaded.  This fixes a bug that was caused by the field names are
returned alphabetically by Postgres and thus always setting the value to
the alphabetically first item instead of the amended version, if it
exists.

Add a management command, ``export_cases_by_class`` to export a table of
the number of cases for each felony class. This mirrors the table at
https://performance.cookcountyil.gov/Public-Safety/Number-Of-Felony-Cases-Filed-By-Felony-Class/kcfs-dufb

Add  another management command, ``export_cases_class_change`` to export
a table of how cases class change between the initial and amended
classes.

The heavy lifting of these management commands is done by queryset
methods.

Addresses https://github.com/sc3/cook-convictions/issues/144
Git should ignore additional files

Ignore recently added datasets.

Ignore the export directory that contains exported data files.

The point of this is making the `git status` output a little easier
to parse.
Use the nicely formatted statute when reporting most common statutes
__str__() method for CensusPlace model
Geocode all dispositions

Don't try to limit geocoding only to Cook County and Chicago zipcodes.
This filter ended up missing a bunch of records that were actually
in Cook County.
Export drug convictions by charge class as table
Merge pull request #19 from ghing/master

Merge data analysis updates from Geoff's fork