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)
tibble with geolocation information (e.g. created by wrcc_qualityControl()
or airsis_qualityControl
)
diameter in meters used to determine the number of clusters (see description)
name of longitude variable in the incoming tibble
name of the latitude variable in the incoming tibble
maximum number of clusters to try
flag, rather then remove, bad data during clustering
Input tibble with additional columns: deploymentID, medoidLon, mediodLat
.