Live data from Hacker News

Map Clustering Is Not My Favorite

blog.greg.technology

31–40 of 45 posts

Re: Map Clustering Is Not My Favorite

#31
Flawed article (but not Greg's fault, see Edit).

The dataset he's using is like 10x smaller than the one displayed in AO.

Edit:

Something's weird then (on either end).

Go to Downtown Toronto, I see about 200 places total. On your map I only see about 50.

Actually ... if you scroll down from there, on the southwest side of Lake Ontario, just north of St. Catharines, I see a big cluster of 197 elements, which does not show on your map. I think the map on AO is overcounting markers. You discovered a bug Greg, congrats!

Re: Map Clustering Is Not My Favorite

#32
post #26

Earlier quoted context omitted.

Checkout how leaflet does this, it is the "spiderfy" part of markercluster. So you click down into the number bubble, and at the lowest zoom explodes out into multiple point markers.

I think for my purposes, people would rather see a list of the groups meeting at that place than click individual identical markers arranged around the point to see what's there. I can see why this would be helpful in other use cases though!

That is a good point (spiderfy is good if you want to show multiple icons and click on each one specifically).

If you do not like the cluster-marker, you could have an icon just list the total number at that location, and then on hover (or click for tooltip) show the table. And that may honestly be better than the spiderfy example for most applications now that I am thinking about it.

Maybe a better example, ESRI when you click a popup has a series of HTML, https://data-ral.opendata.arcgis.com/datasets/raleigh-police..., so if you click one of the grey circles it contains multiple points, you can basically go through different views (either all the elements or click through to a more detailed view of the individual point).

Re: Map Clustering Is Not My Favorite

#33
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.

Re: Map Clustering Is Not My Favorite

#34

The map in hotels.com does a good job of clustering. For example, searching for hotels in a high density area like NYC. Airbnb, conversely, does not seem to have any clustering. Properties vanish and reappear at various zoom levels.

agreed re: hotels.com - what I see them doing well:

- don't cluster aggressively ie break out the clusters earlier (even if markers end up overlapping) - allow clusters and non-clusters to co-exist on the same zoom level (this is usually the case - except when maps are implemented to have "cluster only" levels and "point only" levels) - show immediately useful information in the point marker (the price!)

Re: Map Clustering Is Not My Favorite

#36

Flawed article (but not Greg's fault, see Edit). The dataset he's using is like 10x smaller than the one displayed in AO. Edit: Something's weird then (on either end). Go to Downtown Toronto, I see about 200 places total. On your map I only see about 50. Actually ... if you scroll down from there, on the southwest side of Lake Ontario, just north of St. Catharines, I see a big cluster of 197 elements, which does not…

I am using 100% of all points from atlas obscura -- see [0] - the data is baked in the html and [1] my source which lists all 30k+ points

[0] https://www.atlasobscura.com/articles/all-places-in-the-atla...

[1] https://gregsadetsky.github.io/clustering-is-not-my-favorite...

Re: Map Clustering Is Not My Favorite

#37
That’s a useful article, and as impressive as these demos are, and how smooth Maplibre is, I dearly wish people would spend more time on building map tech that is actually based on geoscience.

The heat map is a good example. What does it mean? Points per what? And I can’t bear to talk about the tyranny of Web Mercator.

Maps are so much more powerful when they mean something, and convey scientific facts or actionable evidence.

As far as I know there isn’t a permissively licensed, open source map renderer SDK that can work in a true GIS, e.g. supporting multiple projections.

Re: Map Clustering Is Not My Favorite

#38
I can see this as a critique on over-use of clustering for whether you have more than a handful of points to visualize. However, I do think this article completely misses the use case when you need to give a ballpark overview of density or counts for clusters. There are many use cases when you actually have natural clusters of points, like traffic accidents. When you zoom out, you might actually see patterns in the aggregated data.

Overall, spatial clustering is a very common strategy to understand trends. To dismiss it entirely is a bit sensational.

Re: Map Clustering Is Not My Favorite

#39

That’s a useful article, and as impressive as these demos are, and how smooth Maplibre is, I dearly wish people would spend more time on building map tech that is actually based on geoscience. The heat map is a good example. What does it mean? Points per what? And I can’t bear to talk about the tyranny of Web Mercator. Maps are so much more powerful when they mean something, and convey scientific facts or actionable…

OpenLayers is probably what you're looking for. It supports multiple projections. It's a wonderful library, but a bit more ceremony is required than MapLibre/box and leaflet.

Re: Map Clustering Is Not My Favorite

#40
I agree. I hate the clustering when I have to actually work with a map and not just glance at it.

A big offender to me is https://urbantoronto.ca/map - You can zoom in pretty far and still get clusters of 2-5 points that are easily far enough apart that they could be individually seen and clicked.

https://www.realtor.ca/map is another annoying one.

Post reply on HN