The module is actually fairly simple and works by taking a weighted average on the x and y co-ordinates of the spatial points. To test it out I took the US Census Data 2010 Population estimates at Block Group level for the states of Colorado, Wyoming and Utah and calculated the Population Weighted Centroids for those states. The results of which you can see below:
The blue diamonds are the spatial centers of the state and the red stars are the population weighted centroids as generated by my macro. I was very pleased with the results, in each case you can see how the population centroid is "pulled" towards the state capital.
Post a Comment