I need to do some sort of spatial clustering where each spatial coordinate has a value attribute. So, for example, each point has a salary attached to it.
So each cluster would have a total salary if I summed each point's salary. But I want to have each cluster to be between a certain total salary. For example, New York can spatially be one cluster but based on the total salary it should be three.
I need to do spatial clustering with a constraint on that total salary so it falls between two values.
Right now all I have is some Python for hierarchical spatial clustering but I don't know how to take into account the attribute!
If you need to do constrained clustering then: I ended up creating a distance matrix for each point then iteratively combined each point with the nearest point/cluster if and only if the sum of the cluster values would stay below a certain threshold. There were a few other rules I'll try to remember
– Tylerr Dec 15 '18 at 23:32