https://github.com/ceteri/chicagocrime
predictive modeling for crime rates in Chicago wards; published KDD 2013
https://github.com/ceteri/chicagocrime
Last synced: over 1 year ago
JSON representation
predictive modeling for crime rates in Chicago wards; published KDD 2013
- Host: GitHub
- URL: https://github.com/ceteri/chicagocrime
- Owner: ceteri
- Created: 2013-05-03T22:33:20.000Z (about 13 years ago)
- Default Branch: master
- Last Pushed: 2013-05-29T16:34:42.000Z (about 13 years ago)
- Last Synced: 2025-02-24T12:23:03.414Z (over 1 year ago)
- Language: R
- Homepage: http://kdd13pmml.files.wordpress.com/2013/07/pattern.pdf
- Size: 31.9 MB
- Stars: 5
- Watchers: 4
- Forks: 6
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
ChicagoCrime
============
predictive modeling for crime rates in Chicago wards
Convert from "Community Area" to "Ward"
---------------------------------------
Definitions for "community areas" in Chicago can be downloaded as GIS shapefiles.
The shapefile file `data/chicomm.shp` comes from http://www.lib.uchicago.edu/e/collections/maps/chicomm.zip
Some discussion of how to convert from shapefiles to more general purpose polygons is given in
http://www.quora.com/How-can-I-convert-a-shapefile-to-a-lat-long-polygon-array-for-use-in-Google-Maps
Download, build, and install the GDAL and OGR utilities from http://www.gdal.org/ogr2ogr.html
./configure ; make; sudo make install
Download, build, and install the GEOS utilities from http://download.osgeo.org/
./configure ; make; sudo make install
Install the `lxml` package from http://lxml.de/ and the `shapely` package from https://pypi.python.org/pypi/Shapely
based on instructions in http://osxastrotricks.wordpress.com/2010/07/19/install-python-shapely/
Next, we convert the shapefile to KML, then parse the KML to construct Shapely polygons as "LinearRings", based on
http://toblerity.github.io/shapely/manual.html#linearrings
ogr2ogr -f "KML" foo.kml data/chicomm.shp
./src/py/shape.py foo.kml