Centroid issue on a map - noob error?!


I am trying to create centroids for the wards of my city (Cape Town), on a map. I have tried every approach I could find - vl, svg, leaflet… I suspect it may be my .json file, and/or an iterable issue.

The cell called ‘centroidmap’ in this notebook is the closest I can get it to working. That looks like to me as the right sort of array, but there’s a lot of ‘forbidden’ values in, so something is not being called correctly, I guess.

Other relevant attempts:

I’ve sent you a suggestion using d3.geoCentroid

1 Like