Heat Maps in GIS

| |

Heat mapping, from a  GIS perspective, is a method of showing the geographic clustering of a phenomenon.  Sometimes also referred as hot spot mapping, heat maps show locations of higher densities of geographic entities (although hot spot analysis tends to be used to show statistically significant patterns: more about the difference between heat maps and hot spot maps).  The ‘heat’ in the term refers to the concentration of the geographic entity within any given spot, not to be confused with heat mapping that refers to the mapping of actual temperatures on the earth’s surface.  Heat mapping is a way of geographically visualizing locations so that patterns of higher than average occurrence of things likes crime activity, traffic accidents, or store locations can emerge.

How to Create Heat Maps

One way to create a heat map is by interpolating discrete points to create a continuous surface known as a density surface.  When calculating a density surface, three main parameters have to be determined that will affect the results.  

Given that the output is a raster file, the cell size will be a determining factor as  to the degree of detail in terms of coarseness of the resulting density surface.  The larger the cell size, the more of a staircase effect on the resulting surface layer.  Conversely, a smaller cell size will result in a smoother surface but processing will take longer and will result in a larger file size.  

The suggested balance is to set the cell size between 10 and 100 cells per density unit. Esri’s Guide to GIS Analysis Volume 1: Geographic Patterns & Relationships (page 79 – affiliate link) provides more detail on how to figure out determine an ideal cell size.

(GIS Lounge is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to amazon.com. Amazon, the Amazon logo, AmazonSupply, and the AmazonSupply logo are trademarks of Amazon.com, Inc. or its affiliates.)

The bandwidth or search radius is the second parameter to be set.  The search radius is the area around each cell the GIS software will factor into the density calculation.  Set a search radius too small and density patterns will be restricted to the immediate area of the point features.  Set a search radius too large and density patterns will become too generalized.

The third parameter is the type of calculation used in interpolating the density surface.  The most simple calculation is a straightforward count of features within a search radius.  The more common calculation is to use a weighted calculation such as Inverse distance weighting (IDW).  IDW assigns more weight to features closest to the starting cell than to features farther away.  In other words, the weight of a given point is in inverse proportion to its distance from the interpolated cell.

Example of a Heat Map

The resulting density surface is visualized using a gradient that allows the areas of highest density (or hot spots) to be easily identified.  This heat map was created from geotagged photos from Panoramio by Ahti Heinla who created what he named the “World touristiness map.”  

Yellow indicates areas with the highest concentrations of photos taken by the highest number of individual photographers (as first noted in Mapping Out Geotagged Photos).  Red indicates areas of moderate “touristiness” and blue are the lowest levels.  Grey areas have no photos in Panoramio.  The areas of highest density in terms of photos uploaded are immediately identifiable with Europe, areas along the coasts in the United States, and areas within Asia most notable.  (You can also view the touristiness map in Google Maps or download the KML file from Heinla’s site.  Heinla also makes available the Python script used to create the overlay.)

World touristiness map by Ahti Heinla.
World touristiness map by Ahti Heinla.

Heat maps are particularly popular for crime prevention planning by law enforcement agencies as being able to identify discernible geographic clusters of higher criminal activity allows for more intelligent deployment of police resources to areas of high crime.  The creation of heat maps has other applications besides crime mapping.  In the example above, a heat map was created to show worldwide “touristiness” based on geotagged images uploaded to Flickr.

Heat Mapping Tools

Heatmap.py is a python script for generating heat maps based on coordinate data.

gheat “implements a map tile server for a heatmap layer.”

As the name implies, HeatMapAPI is an API (with both a limited free and licensed version) that integrates heat map images into Google Maps.   The GeoChalkBoard web site has a post explaining how to use the API to generate a heat map.

Google Fusion Tables has a heat map function available as part of the options for visualizing geographic data.

heatmap.js generates web heatmaps with the html5 canvas element created by Patrick Wied.  The page has usage demonstrations including a Google Maps and an OpenLayers demonstration.


Share this article

Enter your email to receive the weekly GIS Lounge newsletter:

1 thought on “Heat Maps in GIS”

Comments are closed.