# Hierarchical Clustering
# https://www.datacamp.com/community/tutorials/hierarchical-clustering-R

som.cluster <- hclust(dist(data.frame(som.model$codes)), method="single")

plot(som.model,
     main = '',
     type = "property",
     property = som.cluster$order,
     palette.name = topo.colors)

add.cluster.boundaries(som.model, som.cluster$order)
