Skip to main content
100%

Voronoi binning

✓ Published0🌍 Public
PPhilippe Rivière
Last edited Sep 18, 2016
Created on Sep 18, 2016

4000 random points are colored by the nearest of 400 weighted sites, selected as the top 10% by a random weight and arranged as a Voronoi diagram using d3.voronoi. A custom `find` method on the diagram, which walks neighboring cells via halfedges and optimizes from the last result, assigns each point the site color of its containing cell. Circles are rendered in SVG, with radius proportional to the square of each point’s weight.

AI-generated description

Use <a href='http://bl.ocks.org/Fil/1b7ddbcd71454d685d1259781968aefc'>Voronoi.find()</a> to group data by the Voronoi cells of the top 10% data points.

See also the <a href='//bl.ocks.org/Fil/959437d834f4a01eb4d1023cdd107554'>animated version</a>.

Original work by Philippe Rivière for d3-voronoi (issue 17).

gpl-3.0 Licensed

Similar vizzes