Menu

1 / 5

hexbin-heatmap: binning points into H3 hexagons and geohash cells, in browser and CLI

DEV Community: frontend·Abdeldjalil Chougui·3 days ago
#c9D0zifS
#devtofrontend#devto#dev#cell#geohash
Long article (1297 words) — no AI summary yet.
Reading 0:00
15s threshold

Put fifty thousand points on a map and you stop seeing data. Markers pile on top of each other, the dense areas turn into one solid blob, and you cannot tell whether a spot holds ten points or ten thousand. The standard fix is to stop drawing points and draw cells instead: cut the map into a grid, count what falls in each cell, and colour the cells.

That idea is easy to say and has more moving parts than I expected. Which grid? How do you colour values that span several orders of magnitude? What happens to a cell that crosses the 180° meridian? hexbin-heatmap is the project where I worked through those questions.

It bins point data (CSV or GeoJSON) into H3 hexagons or geohash cells and shows the result as a choropleth heatmap in MapLibre, with a resolution slider. The same aggregation is available as a command-line tool that writes GeoJSON or CSV.

What it does

A web app. Open a CSV/TSV or a GeoJSON file with Point or MultiPoint features. Files are read locally and never uploaded.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.