quest-bih / clinical-dashboard

https://quest-bravo.bihealth.org
GNU Affero General Public License v3.0
0 stars 2 forks source link

Add percentage, numerator, and denominator in plot hover text #22

Closed delwen closed 2 years ago

delwen commented 2 years ago

Display percentage (rounded), numerator, and denominator in plot hover text.

TBD in which plot(s)!

bgcarlisle commented 2 years ago

I did it!! bee42b77829c9ed3092df691689aa3e155b15449

delwen commented 2 years ago

@bgcarlisle I love it!! 👍 Would just round the percentages.

I find this helpful to interpret the data. What do you think? Shall we extend to other plots? If so, happy to support!

bgcarlisle commented 2 years ago

That should do for the percentages: https://github.com/quest-bih/clinical-dashboard/commit/777aae58426a2f3904b868520b54259e7a84d908

Happy to extend this for other plots!

bgcarlisle commented 2 years ago

Thoughts on the DRKS prospective registration plot? It's a little weird having all those empty years to the left, but I checked the data and it looks right

delwen commented 2 years ago

Hmm, may need to re-apply the IntoValue inclusion criteria (completion year 2009 - 2017).

Also, should we stick to plots by completion year (where applicable)?

bgcarlisle commented 2 years ago

I think we had decided to go with start year for prospective registration, because we'd lose the most recent trials because they don't have a completion date yet

And so for consistency, I imagine it should be the same for both CT dot gov and DRKS

bgcarlisle commented 2 years ago

If I run the following with the IV inclusion criteria added:

iv_all %>%
    filter(registry == "DRKS") %>%
    filter(completion_year >= 2009, completion_year <= 2017) %>%
    mutate(start_year = format(start_date, "%Y")) %>%
    count(start_year)

I still appear to get those stragglers at the left:

# A tibble: 17 x 2
   start_year     n
   <chr>      <int>
 1 1998           1
 2 2002           2
 3 2003           1
 4 2004           1
 5 2005           5
 6 2006           6
 7 2007          10
 8 2008          28
 9 2009          42
10 2010          60
11 2011          72
12 2012          77
13 2013          92
14 2014          89
15 2015          84
16 2016          51
17 2017          24
delwen commented 2 years ago

Just wrapping up our key points: we'll keep the prospective registration plot as is, displaying start date for both CT.gov and DRKS (avoid losing most recent trials and keep consistency across both plots).

TODO: as discussed, extend hover-over with numerators, denominators, and percentage (rounded) to all plots on all pages. So I'll leave the issue open for now!

bgcarlisle commented 2 years ago

Added them to the remainder! 9524bef9971a33d687d18ab2a5c07aae3f46ae52

delwen commented 2 years ago

Love it!! 🥳