Stack Exchange Network
Stack Exchange network consists of 181 Q&A communities including
Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Visit Stack Exchange
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It only takes a minute to sign up.
Sign up to join this community
Anybody can ask a question
The best answers are voted up and rise to the top
3 years, 11 months ago
This question already has answers here:
3 years ago.
In my map as you see below, I have my population by district.
I want to create 50 clusters with
similiar sums of the population and by proximity. How I can achieve this?
For each cluster, I want the districts are next to each other (As you can see in yellow in the picture).
28.1k 4 4 gold badges 50 50 silver badges 119 119 bronze badges
Apr 5, 2019 at 5:21
Simon GIS Simon GIS
380 2 2 silver badges 12 12 bronze badges
Not a full-fledged answer, but:
Build an adjacency matrix of your polygons, to know which is adjacent to which. This may be done either through the R provide scripts, or Python, as far as I know there is no current implementation built in QGIS;
Search via breadth-first search for the neighbours, and keep on checking whether you got to the population required.
You will need tweaks - you do not say if the population is given by a constant, or determined as a fraction of the overall population.
Apr 5, 2019 at 5:36
864 5 5 silver badges 13 13 bronze badges
By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our
Accept all cookies
Necessary cookies only
clusterin the search window of the tool box?