Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

High settings of max zoom make heat map not accurately reflect the data #8763

Closed
thomasneirynck opened this issue Oct 19, 2016 · 5 comments
Closed
Assignees
Labels
bug Fixes for quality problems that affect the customer experience [Deprecated-Use Team:Presentation]Team:Geo Former Team Label for Geo Team. Now use Team:Presentation Feature:Coordinate Map Feature:Visualizations Generic visualization features (in case no more specific feature label is available)

Comments

@thomasneirynck
Copy link
Contributor

thomasneirynck commented Oct 19, 2016

the heat map visualization type in Kibana does not really show what we would expect. It should bring out areas of high incidence.

Consider:

image

Judging from this image we would expect the densest cluster of data to be at the Ohio-Indiana border.

image

However, the peakiest data is in the Philadelphia area.

This is because we are creating a heatmap based on aggregation data (at the geohash-cell), but not on the raw incident data. This causes us to overweigh the clump of geohashes in Indiana, but ignore the peaky incidence in Philadelphia.

Ironically, the 'Shaded Geohash Grid' map best approximates a "heat map", albeit a coarsely grained one.

There is no "quick" fix for this. Heat maps should be generated from raw incidence-data. Generating these from a derivative causes unintuitive results.

@spalger spalger added bug Fixes for quality problems that affect the customer experience and removed release_note:enhancement labels Oct 19, 2016
@trevan
Copy link
Contributor

trevan commented Oct 19, 2016

Change the "maximum zoom" value for the heat map settings to be equal to the actual zoom you are looking at. I think that will make it look as you expect. I've patched my instance to always do that and the heatmap looks a lot better.

@spalger
Copy link
Contributor

spalger commented Oct 19, 2016

Interesting @trevan, seems to produce better results here

@thomasneirynck
Copy link
Contributor Author

thanks @trevan, that works indeed much better!

Not sure yet why we have that setting in there right now. My initial gut reaction is that maybe we should consider removing it.

@thomasneirynck thomasneirynck self-assigned this Oct 19, 2016
@thomasneirynck thomasneirynck changed the title Heat map visualization does not accurately reflect the data High settings of max zoom make heat map not accurately reflect the data Oct 19, 2016
@thomasneirynck
Copy link
Contributor Author

Looked into this further.

The max-zoom is a Leaflet setting (https://github.com/Leaflet/Leaflet.heat). It describes at which zoom-level the points should have maximum intensity (ie. more red)

This setting makes sense where each point on the map is a single datapoint. This setting avoids that everything would look like a giant rd ed blob when zoomed out because all points are very close together then.

We do not have that problem in Kibana. Kibana does not map individual data points. It maps aggregations. It recalculates this aggregation, each time the geohash-precision level changes. A "geohash-precision" roughly corresponds to 2-3 zoom-levels. (ES can only aggregate on zoom level precisions)

Right now, Kibana creates a new L.HeatLayer, each time the precision changes. (at first glance, there may actually be a bug. Kibana seems to unnecessarily recreate this at each zoom-level change, which is too often).

I propose we:

  • deprecate the maxZoom parameter
  • have Kibana automatically set this parameter when creating a new heatlayer. It could set it to '0'. It could also set it to the lowest zoom level that correspond to the precision. (the effect would be the same).

@thomasneirynck
Copy link
Contributor Author

we deprecated maxZoom parameter in 6.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience [Deprecated-Use Team:Presentation]Team:Geo Former Team Label for Geo Team. Now use Team:Presentation Feature:Coordinate Map Feature:Visualizations Generic visualization features (in case no more specific feature label is available)
Projects
None yet
Development

No branches or pull requests

6 participants