The R package ClustGeo
implements a Ward-like hierarchical clustering algorithm including spatial/geographical constraints.
Details are available is the following vignette:
https://chavent.github.io/ClustGeo
To install the current development version from github, use :
{r eval=FALSE} devtools::install_github("chavent/ClustGeo") # This needs the devtools package to be installed : # install.packages("devtools")