Heatmap Prototyping – Crime, Meth, Politics Examples

by yourmapper on August 27, 2009 · 1 comment

We are working on some interactive heat map technology for all of our maps and data, and we’re very excited about it so we wanted to share it now.  The goal is to start showing the massive amounts of data we have in different formats to help reveal trends and interesting stories.

Crime in San Francisco, CA

Crime in San Francisco, CA

Heat maps can not only show the density of data across entire sets, but they can also show areas where there is no data, which can be just as interesting.  For instance, you might want to see where there are no crimes or sex offenders or republicans at all, in addition to seeing where there are many.

Here are links to some prototype static heat map results from a few of our datasets.  Click a colored grid for a popup, where you can link automatically to that area on Your Mapper with a detailed search.  The KMZ link is good for viewing in 3D in Google Earth.

Note that the final version of this will be fully interactive, where you can draw the bounding box interactively on a map, and filter by categories, date range, or keywords too in real-time.  That way you can get to the data and trends you want to see, much like you can now.  For example, you could just show the density of assault crimes only in your neighborhood for the past  month.  Or maybe all the restaurant areas with a good health review and the keyword ‘sushi.’

For the techies out there, we are trying to overcome a few browser and database issues.  One is that to generate a heatmap that is a 50×50 grid like the ones you see here, it requires 2,500 database queries to get the count of the number of locations within each grid.  It takes a few seconds for maps with hundreds of thousands of points.  We are working to streamline the queries and create optimized database views for this.  Another issue that the resulting KML files are between 500 and 1,000 K, so that’s a lot of data to send to the user.  We might be able to compress them into KMZ files first, which shrinks them 10 to 30 times smaller.  The last issue is that the browsers can have some trouble showing 2,500 polygons on a map.  This one might not be fixable, so we could default to a 20×20 grid (400 squares) and the let advanced users bump it up to 50×50 or anything in between.  If you have some suggestions for these issues, please let us know.

Previous post:

Next post: