Testing @mourner's polylabel with D3.
Orange dot = centroid ; white dot = normal polylabel; green dot = elliptic polylabel.
In this variant from Polylabel with D3 we set different scales for x and y, so as to find the "largest ellipse" to accomodate "horizontal" text labels (the ellipse ratio would match the text bbox ratio).
Built with blockbuilder.org, base map by @mbostock.
https://d3js.org/d3.v4.min.js
https://d3js.org/d3-geo-projection.v2.min.js
https://d3js.org/topojson.v1.min.js