If Madison Crime were Elevation

What if Madison, WI were mapped so that elevation represented crime?  This idea is directly inspired by Doug McCune’s post about mapping San Francisco crime as elevation from last year.

Accessing the data was a little tricky.  In Madison, the police put incident reports online, but some scrubbing of the data is required, and the reports needed to be geocoded.  After a little scripting to overcome these obstacles, I was ready to start mapping.

I divided crimes into 3 broad categories:

  • Robbery/Burglary/Theft
  • Drugs and Alcohol
  • Violent Crime

Here are the results:

Noticeable features:

  • The State Street area (at map-center), linking the capitol and the UW-Madison campus, has the largest spike of robbery activity.  (This will be a recurring theme…)
  • The shopping centers, in particular the malls, have significant numbers of reports.



Noticeable features:

  • State Street is again an unpleasant place to be.
  • The south side (Park St / Fish Hatchery Rd) has its fair share of violent crime, as does the shopping center where Verona Rd meets the Beltline Hwy.
  • Madison’s east side is pretty chilled out.  Perhaps this correlates with the better pizza options?



Noticeable features:

  • Not nearly so much trouble with State St
  • The biggest trouble in town seems to be on the east side.


A few things I learned along the way:

  • How to build a crude web-spider using cURL.
  • How to geocode addresses using the Google Geocoding API — remarkably user-friendly!
  • A few basics about MySQL to store the scraped and geocoded data.
  • Quite a bit about a ray-tracing program called POV-Ray.
  • How to animate graphics using imagemagick — though, the resulting animations (showing the distribution of crimes changing along with the time of day) are far too big to put on this site.

Please leave any questions or comments.


Leave a Reply

Your email address will not be published. Required fields are marked *