Group 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 voronoi.find(). The binning is rendered by using the Voronoi sites's color.
See also the static version — much less code to parse!
Original work by Philippe Rivière for d3-voronoi (issue 17).