I am using ArcGIS 10.5.
I have a list of ZIP codes and a number of listings (consider it the number of incidents in each polygon). In each ZIP code I want to group the ZIP codes in such a way that I get territories (bigger polygons by merging the shape) having a total of listing (sum of incidents in all the polygons merge for making the bigger polygon) in range 700-750 per territory.
I tried the grouping analysis tool, but I could not apply the logic of bringing listing value to 700-750 in each territory.
- Take a polygon if the listing value (attribute) is less than 750. For that polygon look for another nearest polygon to it and merge it with the first polygon.
- Add the listing attribute of both polygons to get the value for the bigger polygon.
- Keep on repeating 1-2 till the bigger polygon reaches the 700-750 range.
- Continue for the whole map.