Open corneliusroemer opened 2 years ago
I see CIs maybe already added??
It would be nice to show the CIs by default but have an option to turn them off.
For the "Compare variants" mode, we can just calculate the usual binomial CIs using the Wilson score. For the "Compare variants to a baseline", I suggest calculating the Binomial ratio confidence (that we originally implemented for the hospitalization rate plots): https://github.com/cevo-public/cov-spectrum-website/blob/dc9fc5ae8027767fff78d0a5b394dee674131aad/src/helpers/binomial-ratio-confidence.ts.
Hi @corneliusroemer and @chaoran-chen !Would you like to show the CIs on plot as separate grey (dashed or solid) lines surrounding the main lines (the CI lines can be toggled away), like this? Or did you have another idea?
I was thinking about colored and partially transparent areas similar to the existing ones
Instead of blue, the area should have the same color (but lighter/partially transparent) as the solid lines
Is there maybe some code that you can reuse?
@chaoran-chen like this?
Yes, that's great!
Application of approximateBinomialRatioConfidence function to the "Compare variants to a baseline" case is a bit more complicated. Do you mind if I make a PR for this simple 'Compare variants" case and make the "Compare variants to a baseline" later (maybe, I'll need to ask Dave for help when he is back from holidays next week).
Okay, sure :)
Just brainstorming a few things that'd be nice to have and round off the feature