block by fil 17fc857c3ce36bf8e21ddefab8bc9af4

Weighted Centroid of the world largest cities

Full Screen

1692 largest cities in the world, weighted by their population sizes. Where does the centroid lie on the surface of the Earth?

d3.geoCentroid() doesn’t account for different weights on Points. Here the spherical centroid of the largest cities in the world, both not-weighted (in blue), and weighted by their populations (in salmon).

Original work by Philippe Rivière for Visionscarto.net. Comments and variants very welcome!

Using d3-annotation() and d3-voronoi find(). Double-click to enter edit mode.

For performance, the map itself is drawn on a <canvas> element; the annotations are displayed on a SVG overlay.

index.html