Kernel Density Estimate

Overview

Create Kernel Density Estimates of the GPS data. In contrast to MCP, KDE's use all the known locations and create a density surface from which probability of encountering the animal in any given location can be estimated. A density surface raster is computed from all of the indivdiuals kernels by summing up the heights of the bells that overlap. One could futher reclassify the raster surface according to percentage values.

Heatmap (Kernel Density Estimation Tool)

  1. Under the Processing menu, open the toolbox and search for kernel to find Heatmap (Kernel Density Estimation) under the Interpolation tools. The tool asks for an input point layer, and then a radius. The radius is used to define an area for calculating a local density estimate around each point. We can use a formula to determine an ideal radius; the hopt method seems to be commonly employed for this purpose.

  2. In the tool bar, navigate to Plugins > Manage and Install Plugins and search for standard

  3. Select and install the plugin Standard Deviation. For the hopt formula, we need to know the standard distance for our layer, which measures the degree to which features are dispersed around the spatial mean or center of the distribution.

  4. Navigate back to the tool box and search for Standard Distance and launch it.

  5. Select your point layer and you can save this as a scratch layer. The output layer will consist of a circle where the center is the mean center of the distribution, and the circle represents the standard deviation. Right click on the layer > Attribute Table.

Knowing the Standard Deviation value from the attribute table, we can use the hopt formula:

=((2/(3N))^0.25)SD

Where N is the number of features and SD is the standard distance. Use Excel to plug in these values and do the calculation.

((2/(3*(99673))^0.25)*19332) = 1653
  1. Go back to the tool box and search for Kernel to find Heatmap (Kernel Density Estimation) under the Interpolation tools again. Now we know the radius so use 1653 as the input radius. The output raster size does take some experimentation. The larger the pixel size, the coarser or more general the resolution will be. You want to choose something that makes sense based on the size of the area, the number of points, and / or some other contextual information. Just like the radius, the units are based on the map units of your layer. Use 30x 30 pixel size. Keep the defaults for the other options.

  1. The output raster is initially displayed in black and white. Right click the layer > Properties > Symbology. Change the render type from Singleband gray to Singleband pseudocolor.

  2. Lastly, change the value color of anything labeled 0 to transparent.

  1. Next, select Legend Settings and change the min and max value to high and low.

  1. Click OK > OK. Your map should look something like this now (toggle off all other layers and keep landcover and the hill shade on). The blue areas are high density areas and orange is low.

What if we want specific contour intervals?? Again, we can run this in R using the adehabitatHR package.

Using adehabitatHR package (Advanced)

  1. Create a new R script from the processing tool menu

  1. Copy and paste the code below that uses the adehabitatHR package. This is similar to the MCP script where we will have a field to input a percent contour value. Click Save Script

##Home Range Analysis=group
##load_vector_using_rgdal
##Layer=vector
##Percentage=number 50
##Home_ranges=Output vector
library(adehabitatHR)
library(rgdal)
library(raster)
library(rgeos)
library(sf)

udbis <- kernelUD(Layer, h = "href")
ver <- getverticeshr(udbis, standardize = FALSE)
Home_ranges <- getverticeshr(udbis, percent= Percentage)
  1. The script should now show up in your Home Range Analysis group in your tool box. Double click it to interact with the GUI.

  1. Select your point layer, enter a percent contour and click Run

Now you have all the tools needed to run KDE and MCP in QGIS!

Last updated