forage_density: Function to generate Kernel Density plot from Beaver Forage...

View source: R/fkd.R

forage_densityR Documentation

Function to generate Kernel Density plot from Beaver Forage Data

Description

This function allows users to generate a kernel density raster from a collection of points.

Usage

forage_density(
  forage_points,
  impact_cat,
  grid_size = 20,
  kern_bw = 250,
  kd_extent,
  kd_weights = c(1, 1000, 1e+06),
  low_thresh = 1e-12,
  standardise = FALSE
)

Arguments

forage_points

The foraging sign point data - must be either an sf object or an sf-readable file. See sf::st_drivers() for available drivers

impact_cat

A character vector of length one containing the column name which describes the feeding impact category (i.e. Low, Medium, or High). If not provided kernel density is not weighted

grid_size

The raster grid cell size desired.

kern_bw

The bandwidth for the kernel denisty search radius.

kd_extent

The desired extent of the output raster.

kd_weights

A numeric vector of length equal to the number of unique impact categories.

low_thresh

A lower threshold for setting the minimum desired value. Values < low_thresh are set to NA.

standardise

Boolean to specify if densities shoul be standardised between 0-1.

Value

"RasterLayer" object with kernel denisity estimates for feeding signs

Examples

# Here we filter the filter the built in 2019-2020 ROBT feeding sign data `RivOtter_FeedSigns`
# Then pipe this 'sf' object to forage_density.

RivOtter_FeedSigns %>%
  dplyr::filter(SurveySeason == "2019 - 2020")%>%
  forage_density(., 'FeedCat')


h-a-graham/beavertools documentation built on July 21, 2023, 12:47 a.m.