Simple script to estimate urban populations from the Kontur population dataset.
The script first classifies H3 cells into urban and non-urban based on a population density threshold (default 5000/km^2). Urban cells are then aggregated as long as they form nearly contiguous regions (up to a maximum cell separation threshold). In this way, it is possible to generate city definitions in a standardised way throughout the world.