Hexgrid library

Hi, I’ve fallen in love with hexagons, and have a lot of use cases where I would like to illustrate a set of data as hexagons in a grid. The d3 library is perfect if you would like to map alot of custom data into hex bins, but if you know the index of the hexagons and just would like to draw them, I did not find any easy way to do that with the libraries I found.

I therefore created a very basic helper library, and I’d like to share it if anyone else finds it useful:

https://observablehq.com/@andreassolberg/hexgrid-library

2 Likes