In my current project I'm visualizing data on a map representing some values for each administrative areas of a country. I'm given a shapefile of this country, which I'm converting to GeoJSON for use with PolyMaps. Now I've got a requirement to cluster multiple areas into bigger ones, since there is no data for some of the smaller parts, but aggregated data for big ones can be acquired. Those clusters are predefined (e.g. A+B+C=D), so I figured it would be easier to produce a clustered shapefile and convert that to GeoJSON afterwards.
But how do I create such a cluster, preferably automated and with open-source tools? Any other sensible way is of course welcome too.