Voronoi binning (animated)
Four thousand random points are colored by size, with the largest ten percent becoming Voronoi sites. The animation cycles through stages: it sorts points by size, uses the top ten percent as sites for d3.voronoi, then assigns every point the color of its site’s cell via the customized `diagram.find()` method. Points and cells fade, recolor, and reset every nine seconds using d3.interval and transitions.
AI-generated descriptionGroup data points around the largest points.
The recipe is as follows:
sort data points according to their sizes (here size =
d[3])use top 10% points as Voronoi sites
bin all data points according to their Voronoi cell, using <a href='http://bl.ocks.org/Fil/1b7ddbcd71454d685d1259781968aefc'>voronoi.find()</a>. The binning is rendered by using the Voronoi sites's color.
See also the <a href="//bl.ocks.org/Fil/7c3c41f1524dcf2caea54290cceddf0a">static version</a> — much less code to parse!
Original work by Philippe Rivière for d3-voronoi (issue 17).