Clustering is used to assign individual measurements to deployment locations.

The value of clusterRadius is compared with the output of cluster::pam(...)$clusinfo[,'av_diss'] to determine the number of clusters.

addClustering(
  tbl,
  clusterDiameter = 1000,
  lonVar = "longitude",
  latVar = "latitude",
  maxClusters = 50,
  flagAndKeep = FALSE
)

Arguments

tbl

tibble with geolocation information (e.g. created by wrcc_qualityControl() or airsis_qualityControl)

clusterDiameter

diameter in meters used to determine the number of clusters (see description)

lonVar

name of longitude variable in the incoming tibble

latVar

name of the latitude variable in the incoming tibble

maxClusters

maximum number of clusters to try

flagAndKeep

flag, rather then remove, bad data during clustering

Value

Input tibble with additional columns: deploymentID, medoidLon, mediodLat.

References

When k-means clustering fails