Skip to contents

This function take an sf:sf data.frame and performs hierarchical clustering with contiguity constraints.

Usage

geohclust_poly(df, method = "ward", scaling = "raw")

Arguments

df

an sf:sf data.frame with polygons like features

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 hclust::hclust like object with three additional slots

leafs_geometry

geometries of the dendrogram leafs as an sfc list

geotree

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

data

The numeric data (eventually scaled used for the clustering)