road_malo: Identify hotspots on roads

Description Usage Arguments Details Value Author(s) References Examples

View source: R/road_malo.R

Description

Identify hotspots on roads using an adaptation of Malo et al. (2004) method.

Usage

1
road_malo (count_path, roads_path, thresh = 0.95, split_length = 500, group = "all")

Arguments

count_path

Path for the .csv file with the location of the observations. The file must have three headed columns (ID, x coordinate and y coordinate) with one observation per row. The coordinates must have the same projection as the roads shapefile. The header names are indiferent but the columns position must be as described.

roads_path

Path for the .shp file with the roads. The file must have

thresh

Hotspot probability threshold. Can assume values in the range [0, 1]

split_length

Length of the road segments in map units

group

String used to subset species/groups from the observations dataframe. Can be a single string or multiple strings. For multiple strings use: c("spe1", "spe2"). By default all observations are used.

Details

The road sections with high observation rates are defined by detecting clusters of animal locations. The spatial pattern of observations is compared with that expected in a random situation. Based on the hypothesis that observations for each road section would show a Poisson distribution (Boots & Getis 1988), the probability of any road segment having x number of observations is: p(x) = λx/(x!eλ). Hotspots are then defined as those segments whose probability of observations is lower than the threshold probability. For instance a 0.95 threshold value means that segments whose number of observations have less than 5 of ocurrence (1-0.95 = 0.05), given the observations distribution, are considered hotspots

Value

SpatialLinesDataFrame object with the road segments identified as hotspots

Author(s)

Bruno Silva

References

Malo, J.E., Suarez, F., Diez, A. (2004) Can we mitigate animal-vehicle accidents using predictive models? J. Appl. Ecol. 41, 701-710 (doi: 10.1111/j.0021-8901.2004.00929.x)

Examples

1
2
3
roads_path <- system.file("extdata/roads.shp", package = "roadHotspots")
count_path <- system.file("extdata/count.csv", package = "roadHotspots")
output <- road_malo(count_path, roads_path) 

berdinazzi/roadHotspots documentation built on Feb. 3, 2022, 4:44 a.m.