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

Automatically generate ranges for range/histogram agg #3757

Open
saffroy opened this issue May 5, 2015 · 6 comments
Open

Automatically generate ranges for range/histogram agg #3757

saffroy opened this issue May 5, 2015 · 6 comments
Labels
Feature:elasticsearch Feature:Lens Feature:Visualizations Generic visualization features (in case no more specific feature label is available) impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. release_note:enhancement Team:Visualizations Visualization editors, elastic-charts and infrastructure
Projects

Comments

@saffroy
Copy link

saffroy commented May 5, 2015

In some cases it would be very useful to have Kibana generate the ranges used for the range agg with simple rules, for example:

  • "generate 5 equal ranges between 100 and 200" would yield: [100-120] ... [180-200]
  • "generate exponential ranges from [0-0.01] up to 10" would yield: [0-0.01], [0.01-0.10], [0.10-1.0], [1.0-10.0]

The second example is especially useful to plot a distribution of latencies with a long tail.

@saffroy
Copy link
Author

saffroy commented May 11, 2015

I mentioned the range agg, but now I think these enhancements might as well (possibly better) fit the histogram agg.

@rashidkpc rashidkpc changed the title Automatically generate ranges for range agg Automatically generate ranges for range/histogram agg Dec 10, 2015
@ppf2
Copy link
Member

ppf2 commented Sep 19, 2016

+1 With the field stats api, we could quickly get the min and max values for a field as the first query to help build out the ranges automatically before sending the query in.

@tbragin
Copy link
Contributor

tbragin commented Oct 17, 2016

For reference, here is the ES enhancement ticket: elastic/elasticsearch#9572

@timroes timroes added the Feature:Visualizations Generic visualization features (in case no more specific feature label is available) label Aug 8, 2018
@timroes timroes added the Team:Visualizations Visualization editors, elastic-charts and infrastructure label Sep 16, 2018
@monfera
Copy link
Contributor

monfera commented Jun 25, 2019

Just adding that occasionally, the binning is not determined based on fixed interval of the independent variable, but on quantiles. An often used quantile is the quartile, eg. showing IQR (interquartile ranges. Boxplots usually derive from IQR values and by extension, their continuous adaptation, bandlines too.

Ticket #3905 is also related.

There are also histogram types where it's not the "height" but the "width" that varies, ie. widths are determined in line with probabilities, a way of showing quantile data.

Sticking to the plain variety of histograms, some method is often used to automatically determine the histogram bin count based on a calculation, eg. the Sturges' formula.

@agirbal
Copy link

agirbal commented Sep 12, 2019

+1 on @monfera's point being able to generate the X-axis bucketing automatically by percentiles of a value. The percentile distribution type of histogram is how most changes and AB tests are evaluated for me these days. For these use cases we have to make use of Tableau today.

@wylieconlon
Copy link
Contributor

We don't automatically generate ranges for the range aggregation in Kibana, but we did start doing it for the histogram aggregation in 7.10: #76001. It's not quite as fully-featured as the ideas originally mentioned in this issue, but I think it covers the most common case where you just want evenly spaced intervals.

@kibanamachine kibanamachine added this to Long-term goals in Lens Jun 21, 2022
@timductive timductive added the impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. label Feb 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:elasticsearch Feature:Lens Feature:Visualizations Generic visualization features (in case no more specific feature label is available) impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. release_note:enhancement Team:Visualizations Visualization editors, elastic-charts and infrastructure
Projects
No open projects
Lens
  
Long-term goals
Development

No branches or pull requests

10 participants