Density

Density Surfaces

Many types of event or count data are collected at points

  • population in census tracts
  • earthquakes
  • bird counts
  • rainfall and snowfall
  • pest traps (gypsy moths, for example)
  • air quality (e.g., PM10)
  • well samples (for water quantity or quality)
  • houses with asbestos
  • hazardous waste sites
  • volcanoes

It is often desirable to know how many whatevers occur per area, like this example of landslides triggered by a major earthquake in New Zealand. A Density analysis counts the number of points within a search area, and is one of two ways that you can go from points to a surfaces. The others are to interpolate a surface from the values of the points themselves, or use Thiessen polygons or allocation. Which of the above are appropriate for analyzing “density” and which would you use another?

For the QGIS density analysis, you have the option of choosing the search radius, and whether the summation used in “count” is just the number of points or the value of some field in the attribute table associated with the point. Open the project for earthquakes. You can extract density as its own raster layer, or compute it symbolically.

  • Option 1: Run the Heatmap (Kernel Density Estimation) tool. A Kernel is a mathematicallyu derived search window that moves over the surface of your layer. You can tweak the selection parameters of this heatmap tool – how big of an area it searches when estimating density, the output raster cell size, whether to weight or measure distance with respect to some other attribute (earthquake magnitude, focal depth), and even the mathematical function used to define the kernel (Quartic or circular by default).

    Screenshot
  • Option 2: Under Layers styling for points, you you canchange the rendering style of a point layer using the Heatmap style option. This option presents you with the least control over the output, and the layer is not actually a raster, but for visualziation purposes it cna be useful.

    Screenshot
  • Option 3: Density Analysis Plugin. I did not test this newer tool extensively, but you can see how its more sensitive KDE controls allow you to make more stylized products easily.  This plugin also lets you apply density estimates to polygons. Learn more watching Youtube video.

    Screenshot

Both of these options take advantage of point layers. For line layers, you might use the Line Density tool in the processing tolbox. Below, you can see the density of the road network in north america, left as a singleband gray symbology type.

Screenshot

Make sure you control the output coordinate system! Notice the impact of the search radius on the output. You can see the effect easily. What happens if you make the search radius bigger, or smaller? Without changing from WGS84, your units for searching will be in degrees!

If you want to download earthquake data, you can go to the National Center for Environmental Information (NCEI), hosted by NOAA.

Screenshot