This example shows how to use the d3-hexbin plugin for hexagonal binning. 2,000 random points with a normal distribution are binned into hexagons; color encodes the number of points that fall into each bin. You can also use area encoding. Inspired by earlier work by Zachary Johnson.
https://d3js.org/d3.v4.min.js
https://d3js.org/d3-hexbin.v0.2.min.js