geohclust_knn: Hierarchical clustering with contiguity constraints for point...

View source: R/geohclust.R

geohclust_knnR Documentation

Hierarchical clustering with contiguity constraints for point data with knn links

Description

This function take a data.frame and performs hierarchical clustering with contiguity constraints.

Usage

geohclust_knn(df, k = 3, method = "ward", scaling = "raw")

Arguments

df

an sf::sf data.frame with polygons like features

k

number of nearest neighbors to take for building the graph (the graph will be symmetric so some points may have in fine more neighbors)

method

linkage criterion in ward (default) or average, median

scaling

default scaling of the features in zscore (default) or raw (i.e. no scaling)

Value

an stats::hclust like object with additional slots

data

The numeric data (eventually scaled) used for the clustering

centers

The protoypes of each tree nodes

leafs_geometry

geometries of the dendrogram leafs as an sfc list

geotree

geometries of the dendrogram no-leafs node as an sfc list


comeetie/geohclust documentation built on May 23, 2022, 6:30 a.m.