Skip to content

Automatically generate ranges for range/histogram agg #3757

Description

@saffroy

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.

Activity

  1. saffroy commented on May 11, 2015

    @saffroy
    Author

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

  2. changed the title [-]Automatically generate ranges for range agg[/-] [+]Automatically generate ranges for range/histogram agg[/+] on Dec 10, 2015
  3. ppf2 commented on Sep 19, 2016

    @ppf2
    Contributor

    +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.

  4. tbragin commented on Oct 17, 2016

    @tbragin
    Contributor

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

  5. added
    Feature:VisualizationsGeneric visualization features (in case no more specific feature label is available)
    on Aug 8, 2018
  6. added
    Team:VisualizationsTeam label for Lens, elastic-charts, Graph, legacy editors (TSVB, Visualize, Timelion) t//
    on Sep 16, 2018
  7. monfera commented on Jun 25, 2019

    @monfera
    Contributor

    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.

  8. agirbal commented on Sep 12, 2019

    @agirbal

    +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.

  9. wylieconlon commented on Jun 4, 2021

    @wylieconlon
    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.

  10. added
    impact:lowAddressing this issue will have a low level of impact on the quality/strength of our product.
    on Feb 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Feature:LensTeam:VisualizationsTeam label for Lens, elastic-charts, Graph, legacy editors (TSVB, Visualize, Timelion) t//impact:lowAddressing this issue will have a low level of impact on the quality/strength of our product.release_note:enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions