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