I need to cluster point layer features based on an attribute so each cluster has a similar total sum of this attribute values:
E.g. I have generated 1000 random points with values between 1-100. Task: Cluster these points so each cluster has a sum of values similar to 1000.
In QGIS I have tries several clustering processing tools (K-means, DBSCAN, ST-DBSCAN) and plugins ( Attribute based clustering; ClusterPoints; QGIS Scipy Clustering - no compatible with QGIS 3) but none of these tools/plugins enables the option to cluster the features based on similar sum of an attribute. I suppose PyQGIS is needed for this but I am missing an idea of the workflow to implement this task.
Another (similar) task will be how to cluster these point geometries so the sum of an attribute (numeric) is maximally 1000 (no overrun). Because of the similar approach (question character) I did not create a new question for this task.
Any suggestions/ideas how to calculate this?
