GenSpectrum / dashboard-components

https://genspectrum.github.io/dashboard-components/
GNU Affero General Public License v3.0
2 stars 0 forks source link

Prevalence over time: Make sure that `numerator`s are subsets of `denominator` #257

Open fengelniederhammer opened 6 months ago

fengelniederhammer commented 6 months ago

And another thought: do we prevent users from using a set, where the denominator is a subset of the numerator? In that case we should have values above 1. Do we have a guard there?

_Originally posted by @JonasKellerer in https://github.com/GenSpectrum/dashboards/pull/255#discussion_r1608341117_

I think we should at least mention it in the docs that numerators should be subsets of denominator. Do we also want some real validation? We could also think about merging each numerator with the denominator? Then we can be sure that it's the case.

chaoran-chen commented 6 months ago

CoV-Spectrum supports "compare to baseline"-queries where it is possible to compare two entirely unrelated variants/sets of sequences: e.g., JN.1 vs XBB..

At the moment, the Prevalence over time plot's y-axis is fixed to 0-100% but it would be great if we could make it configurable, allowing the maintainer to set a fixed value, or let the plot set the upper bound itself to the maximum of the data. Then, we can use the component for the same type of comparison.

chaoran-chen commented 6 months ago

By @JonasKellerer: for values beyond 100%, logit doesn't make sense/wouldn't work.