Skip to content
Prev 24292 / 29559 Next

[FORGED] how to calculate centroid (or centre of gravity) of a population (count data)

Maybe I'm being naive, or missing the point, or something.  But I would
presume that your data are something like:

x_1, x_2, ..., x_n # x-coordinates of the locations --- say, stored as x
y_1, y_2, ..., y_n # y-coordinates of the locations --- say, stored as y
k_1, k_2, ..., k_n # counts at the given locations --- say, stored as k

This is interpreted as meaning that (x_i,y_i) is the centroid of the 
i-th region, in which count k_i was obtained.

If so, can you not just calculate:

xc <- sum(k*x)/sum(k)
yc <- sum(k*y)/sum(k)

???

What am I not understanding?

cheers,

Rolf Turner