Replies: 2 comments 2 replies
-
|
I am a bit unsure if collecting more data over => Do you want to know that users in china zooming differently to europe? The advantage of the simpler approach is that we don't need to use so much more memory |
Beta Was this translation helpful? Give feedback.
-
|
We should discuss what format to store these histograms:
Between these, H3 likely looks the nicest and has the least misleading artefacts (webmercator tiles cover different size in meters near 85° and the äquator). https://h3geo.org/docs/core-library/restable/ |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Proposal for a heatmap for Martin Metrics web
The idea is to provide a heatmap of the areas that are hot for a given layer, while being compliant with any arbitrary privacy policy.
Starting point
hot areais defined not only by the number of visits but also because the users zoom deeper within those areasheatmap_max_zoomdue to privacy concernslayer_max_zoomas per its setup (typically layer_max_zoom >> heatmap_max_zoom)z'(z' < heatmap_max_zoom) when browsing our heatmapConcerns
heatmap_max_zoom, we're losing detail for zoom levels in the range[heatmap_max_zoom, layer_max_zoom]Alternative Approach
First, for the sake of simplicity, let's use slippy tiles at the current zoom level, plus an integer delta, as the cells for our heatmap. So, our cells would be defined by
[zº,x,y], beingzº = z' + delta, and the heatmap layer can be easily built.Instead of displaying the number of hits per tile, let's show the most common zoom level that users browse when visiting the area covered by the given tile.
[zº,x_n,y_n]tile in the view. Something like this JavaScript pseudocode:zoomvaluehitsvalueFinal notes
The first half of the logic in this proposal runs on the client side, and the result is a GeoJSON that is recreated with every zoom event in the heatmap. This is obviously suboptimal, and it's been done that way for laziness' sake 😅 as I hate recursive CTEs logic
The right way to implement this would be to move the logic in step 1 to the server side, and store the results of step 1 + step 3 as a view that is served as any other table by Martin
Beta Was this translation helpful? Give feedback.
All reactions