Boxplot aggregation
/ Boxplot, / AggregationBoxplot aggregation #
A multi-value metrics aggregation producing the five-number summary of a distribution: minimum, lower quartile (q1), median (q2), upper quartile (q3) and maximum, plus whiskers.
How it works #
The engine collects and sorts the values of the field, then:
min/maxare the observed extremes (aftermissingsubstitution).q1,q2,q3are the 25th, 50th and 75th percentiles, computed with the same TDigest arithmeticpercentilesuses — weight-1 centroids at(i + 0.5) / nwith linear interpolation between the two bracketing values. A quartile can therefore land between observed values (q2of the sale prices is22.5, between15and30).- The whiskers extend from the quartiles by 1.5 × IQR, where
IQR = q3 − q1, and are clamped to the data:lower = max(q1 − 1.5·IQR, min),upper = min(q3 + 1.5·IQR, max). Values beyond the unclamped whisker positions are the conventional boxplot outliers.
Clamping means on a compact distribution the whiskers simply touch the
extremes — over the teaching sales prices the whiskers land exactly on
min and max. If no document has a value for the field, all seven
numbers are 0.