spatiotemp_weights: Calculate sampling effort across spatial and temporal buffer...

View source: R/spatiotemp_weights.R

spatiotemp_weightsR Documentation

Calculate sampling effort across spatial and temporal buffer from species occurrence records

Description

Calculates the total number of sampling events across a given spatial and temporal buffer from each occurrence record’s co-ordinate and date.

Usage

spatiotemp_weights(
  occ.data,
  samp.events,
  spatial.dist = 0,
  temporal.dist = 0,
  prj = "+proj=longlat +datum=WGS84"
)

Arguments

occ.data

a data frame, with columns for occurrence record co-ordinates and dates with column names as follows; record longitude as "x", latitude as "y", year as "year", month as "month", and day as "day".

samp.events

a data.frame, sampling events with column names as follows; record longitude as "x", latitude as "y", year as "year", month as "month", and day as "day".

spatial.dist

a numeric value, the spatial distance in metres representing the radius from occurrence record co-ordinate to sum sampling events across.

temporal.dist

a numeric value, the temporal distance in days, representing the period before and after the occurrence record date to sum sampling events across.

prj

a character string, the coordinate reference system of input occ.data co-ordinates Default is "+proj=longlat +datum=WGS84".

Details

For each occurrence record, this function calculates the total number of sampling events within given radius (spatial.dist) from each record co-ordinate and days (temporal.dist) both prior and post record date.

In addition to total sampling events, the function also calculates relative sampling effort, scaling from 0 (least sampled) to 1 (most sampled).

Output could be used to calculate model weights to correct spatial and temporal biases in occurrence record collections (Stolar and Nielsen, 2015).

Value

Returns input occurrence record data frame with additional columns for sampling effort "SAMP_EFFORT" and relative sampling effort "REL_SAMP_EFFORT".

References

Stolar, J. & Nielsen, S. E. 2015. Accounting For Spatially Biased Sampling Effort In Presence-Only Species Distribution Modelling. Diversity And Distributions, 21, 595-608.

Examples


data("sample_explan_data")
data("sample_events_data")

spatiotemp_weights(
 occ.data = sample_explan_data,
 samp.events = sample_events_data,
 spatial.dist = 200000,
 temporal.dist = 20
)


dynamicSDM documentation built on June 28, 2024, 5:08 p.m.