Harry Stevens
Harry Stevens
For what it's worth, here is a comparison of methods: https://observablehq.com/d/64001745ea835efe.
I updated the comparison notebook to show the mean and median horizontal shift of the circles.  https://observablehq.com/@harrystevens/beeswarm-methods-compared
There it is.  For what it's worth, I'm agnostic about how the beeswarm example in the README is updated. If you would prefer to not endorse using d3-force to...
> It looks like @HarryStevens has an alternative here https://observablehq.com/@washpostgraphics/geo-albers-usa-pr Yep, I just kept copy-pasting code from d3-geo until it stopped throwing errors.
geometric.**polygonInPolygon**(_polygonA_, _polygonB_) currently returns false if points in _polygonA_ lie on _polygonB_'s edges, even if none of _polygonA_'s points lie outside of _polygonB_. So the function _should_ return false, even...
Sorry I haven't had time to work on this. Everything one might need to try to resolve this is in [this Observable notebook](https://observablehq.com/d/26348661e5517d12). I'm sure I'll get around to it...
It will likely also be necessary to implement a utility method called, say, polygonWind, polygonSort, or polygonOrder because the Martinez et al clipping algorithms require a polygon's vertices to be...
See also: http://sean.cm/a/polygon-clipping-pt1
On simple polygons, see: https://en.wikipedia.org/wiki/Simple_polygon
Fil's done it: https://observablehq.com/@d3/polygonclip