Partition a set of zones such that each part contains about the same number of locations, when the number of locations in each zone for the part are summed over all zones in the part.
partition_zones(zones, n_parts = min(10L, length(zones)))
A set
of zones, each zone itself being a set
containing locations. Locations should be encoded as integers.
An integer; the number of parts to split the zones
into.
A list with two elements:
partition A list, each element of which is a set
containing one or more zones (set
containing locations).
offsets An integer vector containing offset numbers to the
zone numbering. For example, the first zone in
partition[i]
will have will be zone number
offset[i] + 1
.