get_candidates: Get top candidate nests from possible competitors

View source: R/spatial_funs.R

get_candidatesR Documentation

Get top candidate nests from possible competitors

Description

get_candidates uses a distance matrix returned by dist_mat and a user-defined buffer to select candidate nest sites.

Usage

get_candidates(dm, buffer, min_pts = 2)

Arguments

dm

Distance matrix returned by dist_mat

buffer

Buffer distance (in meters) used to group points

min_pts

Minimum number of points within the buffer for a point to be retained. Defaults to 2

Details

Due to both movement and GPS error, recorded points around recurrently visited locations are expected to be scattered around the true revisited location. The buffer is meant to account for this scattering, by grouping points that fall within the buffer distance.

When grouping, several points peripheral to the true revisited location may compete in grouping points around them. We term these 'competing points'. If the buffers of two points do not overlap, those points are not competing. Based on the assumption that the true revisited location is the one that incorporates the most points within its buffer, get_candidates compares the number of points that fall within the buffers of competing points and selects the one that includes the most.

A top candidate is selected for each cluster of competing points, i.e., one representative for each cluster around a revisited location. If there are multiple revisited locations with non-competing points, independent top candidates are all returned.

To speed up calculations, the user can define min_pts as the minimum number of points that need to fall within the buffer for a point to be considered as a potential candidate. This discards isolated points from consideration as revisited locations.

Value

Returns data.frame relating original location identifiers (loc_id) to the identifier of the corresponding candidate nest (group_id).


picardis/nestR documentation built on July 2, 2024, 6:35 p.m.