block by jeremycflin 96ad945056dff2724ad52ac5926e3e64

hexbin map

Full Screen

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:

1) Draw the map

2) Draw a point grid covering at least the map’s bounding box

3) Only keep points within country polygon (w/ d3.polygonContains())

4) Merge point grid data with data to visualise (walmart data from here)

5) Calculate hexbins with d3.hexbin()

6) Draw hexbin map

Built with blockbuilder.org

forked from larsvers‘s block: hexbin map

index.html

us.json