GitHub user CodingJongBot created a discussion: Support precomputed statistics and outliers in Box Plot
Hi everyone, I use Box Plot to visualize large measurement datasets and would like to contribute an option to use statistics calculated in the database. The current chart computes box plot statistics through backend post-processing of query results. For large datasets, I'd like to pass only the summary statistics and outlier values to Superset. Related discussions about the current input granularity and row limits include [#18423](https://github.com/apache/superset/discussions/18423) and [#17042](https://github.com/apache/superset/issues/17042). Would it make sense to add a **Precomputed statistics** mode to the existing chart? Users could map dataset columns to: - Lower whisker, Q1, median, Q3, and upper whisker. - Optional mean, observation count, and a numeric array of outliers. Each row would represent one box, identified by the existing Dimensions. For example: | category | lower_whisker | q1 | median | q3 | upper_whisker | outliers | | --- | --- | --- | --- | --- | --- | --- | | A | 10 | 20 | 30 | 40 | 65 | [2, 75, 90] | | B | 15 | 25 | 35 | 45 | 70 | [] | Column names would be configurable. The new mode would use these values directly, skipping boxplot statistical post-processing and reusing the existing box and outlier rendering. Existing charts would keep their current behavior. Users would supply the statistics through a SQL dataset, view, or table. Filtering these summary rows would not recalculate the underlying distribution. [Matplotlib's bxp](https://matplotlib.org/stable/api/_as_gen/matplotlib.axes.Axes.bxp.html) is a reference for this input format, including explicit outliers. I'm happy to work on the implementation. Does this seem like a useful addition to the existing chart? I'd appreciate feedback on the column mappings and outlier-array input, and guidance on whether this should go through a SIP. GitHub link: https://github.com/apache/superset/discussions/45169 ---- This is an automatically sent email for [email protected]. To unsubscribe, please send an email to: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
