View source: R/clusterise_sites.R
clusterise_sites | R Documentation |
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.
clusterise_sites(
dataframe,
cluster_min_length,
group_radius = 40075000,
day_split_min_length = 10
)
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. |
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.
# 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]])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.