I have been following this tutorial https://james-brennan.github.io/posts/fast_gridding_geopandas/ in order to create a grid on a geographical area and to assign labels to each point.

I was curious whether there is a known algorithm and implementation that can further split or merge this grid so that the overall sample density per grid box is balanced.

1 Answer 1


It exists and it's called tesspy: https://github.com/siavash-saki/tesspy !

Not the answer you're looking for? Browse other questions tagged or ask your own question.