Mapping Atlanta’s Crime Activity: Lessons Learned

This Christmas I decided to attempt to Map Atlanta’s Crime using freely available data from the Atlanta Police Department. This was an effort to test the capabilities of our most recent release (Mogadishu), which include:

  • KML/KMZ Overlays
  • Statistics
  • Theming and more

This installation would also be a true test of how much data the Ushahidi platform could really handle. The Atlanta metro area had about 30,000 crimes reported in 2009 alone, and the question was if we could visualize this data using our platform in a useful way. Here are some of the lessons I took away from this particular project:

Mapping: Clusters

mapatl_cluster

Traditionally we’ve passed the task of clustering the map data on to the users browser via javascript, however this is only useful if you have a thousand or less map points. Even then you can feel the browser groan under the pressure of calculating what point is close to what then placing it on the map. Immediately it is evident that clustering map data points using javascript is not possible and would have to be done on the server using what is known as ‘Distance Based Clustering’, which is basically grouping reports based on their proximity to each other.

There are various methods of doing this which include using the Haversine Formula, the Euclidean distance Formula, or the Manhattan Distance (also known as the Taxicab Geometry). I opted for the latter – which is not very accurate, but creates clusters at the least cost to the server. Since clusters represent a general area, absolute accuracy is not required. I also have to give credit at this point to Mika Tuupola for his good pointers derived from his experience with map clustering.

Mapping: Layers

mapatl_layers

Adding other layers to the map allows you to combine and visualize multiple data sets at the same time, which can lead to interesting revelations. In this installation, I included the Atlanta PD zones, and Sex Offenders. I’ll probably be adding more layers as I gain access to the data. While working on project I came across a Batch Geocoder that is incredibly useful for making datasets mappable.

Grouping Items

mapatl_groups

One functionality that we may have forgotten to mention regarding the Mogadishu Release, is that it gives you the ability to group related categories as illustrated above – something that was quite handy in this installation to group different types of crime.

Proximity

mapatl_proximity

Finally, I realized it might be important to list reports happening near a specific address and order them by distance from the point.

Please click below to view the work in progress:

mapatl_screenshot

17 Responses to “Mapping Atlanta’s Crime Activity: Lessons Learned”

  1. Great open source mapping project you have going on. I’ve been tracking Ushahidi since we met at the 2007 NetSquared conference.

    At Your Mapper, we map a bunch of datasets, including Atlanta crime going back to 2004, over 183,000 incidents (need to do an update though for after Aug 09).

    Overview

    The clustering display is useful for an overview, but we’ve found that heatmaps, at once or by category, are good too for getting a city-wide snapshot with drilldown.

    Heatmaps

    Then when you get down to the details, we show the closest 100 points to your location (that you enter by hand, or auto-detect on our mobile side).

    Map

    Mobile

    It’s tough when you have so much data, to display it with current web tech and not mislead the user, leave out data in a view, or overwhelm the browser. I’ve seen lots of sites that just throw 1000 markers at once at the user and crawl the browser to a halt.

    One of the best ways to show lots of data is Google’s Flash Maps API. New York Times and others use this to show thousands of clickable points at once: http://projects.nytimes.com/toxic-waters/polluters/kentucky

    Great work!

  2. David Kobia

    Hi Michael, having some data to work with is a luxury – too much of it is heaven – so I really can’t complain. We’ve mostly been dealing with places that have little or no data to map, but we hope to change that.

    BTW Brian Herbert had actually alerted me to your work with MetroMapper which is a very good project too.

    We will no doubt be looking to your mobile web version for inspiration, because its something we’re lacking at the moment.

  3. David,

    Thanks for the response.

    Yes, getting data is quite a pain. Some cities are starting to follow the federal government’s data.gov lead and open their data up. If you want to grab some more, check out San Francisco, Chicago, Washington DC, and New York‘s data stores.

    Metro Mapper actually 100% runs off the Your Mapper API which lets developers tap into all our data. It’s a niched site for Louisville, KY, just like another site we run, NYC BigMaps, is a niched site for New York City as part of their BigApps contest.

    Feel free to tap our API to grab data on the fly. The API is powerful enough that we even use it run most of Your Mapper itself.

    Brian is a stand-up guy, no?

  4. Impressive! And the data was uploaded how? In one big load of CSV?

  5. David Kobia

    @Ben, I basically imported the big csv file into its own MySQL table then imported that into the Ushahidi DB via PHP with all the validations.

  6. It’s good to see that the crime activity in Atlanta is in mapping.. By these, they would be able to take measures on how to solve or lessen those crimes..

  7. It really helps..this will show the percentage of crimes and by this map maybe assigned officers can now think foe better solutions on how to eradicate these crimes.