Voronoi binning (animated)
This animated visualization demonstrates Voronoi binning: 4,000 random points are generated, then sorted by size, with the top 10% selected as Voronoi sites. Initially, all dots appear white, but after a delay, the larger site points are colored, and then every other point is recolored according to the site of its Voronoi cell, found via the `diagram.find` method. The animation uses `d3.interval` to repeat the algorithm, `d3.voronoi` for the diagram, and D3 transitions to fade polygons and dots in and out, rendering in SVG.
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).
forked from <a href='http://bl.ocks.org/Fil/'>Fil</a>'s block: <a href='http://bl.ocks.org/Fil/959437d834f4a01eb4d1023cdd107554'>Voronoi binning (animated)</a>