Remix.run Logo
mourner 4 hours ago

Nice article! As someone who implemented both clustering and heatmaps in Mapbox / Maplibre GL JS, just wanted to add that clustering isn't just a visualization technique — it's also a performance feature that can support other visualization types. It might not matter for 30k points, but for e.g. 300k, you can implement dot density with stacked opacity via clustering — use a tiny clustering radius, and style the dots so that opacity is a function of point_count. This creates an approximation of an unclustered viz that performs much smoother. Same thing with heatmaps — you can define heatmap-weight as a function of clustered source's point_count, and it will look nearly identical (aside minor shifts) as the unclustered one, but perform much better.