The main focus when producing hexbin maps showing a full hex-cover of the resepctive country is on the data prep. The key steps of this approach:
Draw the map
Draw a point grid covering at least the map's bounding box
Only keep points within country polygon (w/ d3.polygonContains()
)
Merge point grid data with data to visualise (walmart data from here)
Calculate hexbins with d3.hexbin()
Draw hexbin map
Built with blockbuilder.org
forked from larsvers's block: hexbin map
forked from jeremycflin's block: hexbin map
https://d3js.org/d3.v4.js
https://d3js.org/topojson.v1.min.js
https://d3js.org/d3-color.v1.min.js
https://d3js.org/d3-interpolate.v1.min.js
https://d3js.org/d3-scale-chromatic.v1.min.js
https://d3js.org/d3-hexbin.v0.2.min.js