finos / perspective

A data visualization and analytics component, especially well-suited for large and/or streaming datasets.
https://perspective.finos.org/
Apache License 2.0
7.94k stars 1.06k forks source link

Percentile aggregator #2445

Open i404788 opened 7 months ago

i404788 commented 7 months ago

Feature Request

Add aggregator for percetiles (e.g. 99pt, 95pt).

Description of Problem:

For a cost-benefit analysis I need to know the value which covers in 99%/95% of cases. In my case the highest value which covers those cases after grouping.

Potential Solutions:

Looking at the median implementation, It seems like it would be quite easy to implement given that the values are pre-sorted, and I'm willing to implement it and create a PR.

But I'm wondering what the best way would be to implement it since it has the second-parameter percentile. Adding another 'weighted-sum' type seems like it would be quite a lot of additional items on the UI side.

Additionally you would probably want a max and a min variant depending on the underlying values & analysis.

I will probably implement a proof of concept for my own project, but if there is a preferred way to do that would help.