clusterise_sites: Cluster Occurrence Data

View source: R/clusterise_sites.R

clusterise_sitesR Documentation

Cluster Occurrence Data

Description

Cluster occurrence data by date with the option to group each cluster using a specified radius distance. Each of these clusters of data represents a site and a pair of centered coordinates for each site is generated.

Usage

clusterise_sites(
  dataframe,
  cluster_min_length,
  group_radius = 40075000,
  day_split_min_length = 10
)

Arguments

dataframe

A dataframe with occurrence data for the chosen taxon and location.

cluster_min_length

The minimum number of observations in each cluster.

group_radius

An optional value to have sites grouped. Group radius is measured in metres.

day_split_min_length

By default the function filters out days with fewer than 10 observations. This value adjusts the minimum threshold.

Value

The function returns a 'clusterised object', which is a list containing two elements: The first element is a list of data clusters. The second element is a dataframe that includes centred coordinates for each site, group number, and date.

Examples

# clusterise sites for the entire Huila province of Colombia
Colombia_Huila_dataframe <- subset(Colombia, stateProvince == "Huila")

clusterised_Huila <- clusterise_sites(dataframe = Colombia_Huila_dataframe,
                                      cluster_min_length = 30,
                                      group_radius = 20000
)

print(clusterised_Huila[[2]])

DivInsight documentation built on Aug. 12, 2023, 9:06 a.m.