clusterPy: Library of spatially constrained clustering algorithms. Analytical regionalization (also known as spatially constrained clustering) is a scientific way to decide how to group a large number of geographic areas or points into a smaller number of regions based on similarities in one or more variables (i.e., income, ethnicity, environmental condition, etc.) that the researcher believes are important for the topic at hand. Conventional conceptions of how areas should be grouped into regions may either not be relevant to the information one is trying to illustrate (i.e., using political regions to map air pollution) or may actually be designed in ways to bias aggregated results. For a literature review on spatially constrained algorithms see [Murtagh1985], [Gordon1996], [Duque_Ramos_Surinach2007]. Working with arbitrary spatial units may lead to aggregation problems such as the modifiable areal unit problem, the small numbers problem, spurious spatial autocorrelation, aggregation bias, aggregation error (in location allocation problems). Analytical regions arise as a way to minimize this type of problems.