I've been reading about algorithms for spatial clustering and it's easy to get lost since there are dozens of them. An idea that came to my mind is to use an a-spatial cluster algorithm on a dataset where the lat and long variables are also included as inputs of the model. This way, the algorithm uses the spatial proximity between observations as one additional co-variate in the clustering process.
Question: This idea sounds too obvious and simple to me and yet I haven't seen any book nor manual mentioning this approach, or at least explaining why it shouldn't be used. So I would like to pick your brains on this, what pros and mainly what cons you see in this approach ?
Clearly, this is an unorthodox approach and it's somewhat limited because it considers only euclidean distances and it would work better for spatial points or regular polygons on a regular lattice. Apart from that, I'd like to hear if there are any strong reasons not to use this approach. Any ideas?
Reproducible example below using
library(mclust) library(dplyr) library(spdep) library(sp) # load housing dataset of Lucas county OH/USA data(house) house <- spTransform(house, CRS("+proj=longlat +datum=WGS84")) plot(house)
# get only a sample of points for the sake of code speed df <- data.frame(house) df$id <- 1:nrow(df) set.seed(1) id_samples <- floor(runif(3000, min=1, max=nrow(df))) df <- subset(df, id %in% id_samples) # get variables to input in the model into a matrix df <- df[ , c('long', 'lat', 'yrbuilt', 'avalue')] # get variables lat, long, when the house was built and its value df <- as.matrix(df) # run Mclust model d_clust <- Mclust(as.matrix(df), G=1:9) # the optimal number of clusters is 8 cat("model-based optimal number of clusters:", dim(d_clust$z) , "\n") # plot. The 1st chart on the 1st column shows how the clusters are spatially distributed plot(d_clust, what="classification")