Because why not.
Made with ❤️ by Pascal Ganaye
According to Wikipedia, the standard algorithm for hierarchical clustering is too slow for even medium data sets.
This code works only with two dimensional data.
A document here describes the algorithm in more detail https://docs.google.com/document/d/1d8vldwLr56vUYoXOg0B1O2WVNddBHCNKatMYUlR_atc/edit?usp=sharing
A demo page can be found here