-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
Adds ability to scale Tilemap heatmap intensity values #6014
Conversation
Make sure the heatIntensity is between 0 and 1 as that is the scale that Leaflet.heat uses. #5236 has more information. |
@trevan thanks. Will make that correction right now. |
…nce all output is expected to be normalized between 0 and 1.
Thanks to @trevan's comments regarding |
This needs to be rebased on master or have master merged into it. |
* @param max {Number} | ||
* @return {Array} | ||
*/ | ||
HeatmapMarker.prototype._dataToHeatArray = function (max) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The max
value is no longer being used, and can be removed
This has conflicts again |
Yeah, I am working on fixing these. |
jenkins, test it. |
@jbudz passing this back to you. |
@@ -18,7 +18,7 @@ var bounds = {}; | |||
var MarkerType; | |||
var map; | |||
|
|||
angular.module('MarkerFactory', ['kibana']); | |||
// angular.module('MarkerFactory', ['kibana']); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we remove this line?
LGTM |
jenkins, test it |
Failure due to a breaking change in elasticsearch master. |
@w33ble would you mind being the second reviewer here? |
@stormpython this looks fine, the changes are pretty small and the values that come out seem correct. My dataset doesn't look any different with different scales though... do you have an example or use case or something where I can see the varying results? |
@tbragin would you mind checking out this PR? I figure you have an appropriate dataset which needs a log scale for visualizing heat intensities. Its really hard to test the difference without an appropriate dataset. |
I tried it on a dataset that has some variability in concentration. I don't see any effect - screenshots below. I shared my dataset with @stormpython so he can play with it some more. |
Thanks @tbragin |
The current heatmap has issues beyond this, e.g. #8763. Heatmaps already just give only a rough approximation of the underlying quantities of the data points. Rescaling the inputs only compounds possible mispreresentation. To avoid single-color blobs, the intensity of the heatmap should be under the control of the user, but not sure if we should do this by skewing the underlying values. I will close this for now. We're looking at an overhaul of the mapping visualizations and can pick up #5946 in that context. |
Closes #5946.
At times, data displayed in Tile maps needs to be log transformed in order to properly visualize the results. For a better explanation on this, please read the comments on issue #5946.
The pull requests adds the ability to scale heatmap intensity values using either a
linear
(default),logarithmic
(base 10), orsquare root
scale.Please Note: With log transformed data, all data points must be greater than or equal to 1 as the log(0) is
-Infinity
and the log(negative number) isNaN
. Also, see here.This pull accomplishes creating
scales
usingd3
quantitative scales. For more info on the API, please see the documentation.