From 9fd931aeeba4ab7bdede1a625f64e7024c2b55aa Mon Sep 17 00:00:00 2001 From: Naeem Model Date: Sun, 9 Jun 2024 16:01:51 +0000 Subject: Update Shiny app - Remove template/logic for single data entry - Change 'Add estimators' to 'About estimators'; adding estimators and viewing estimates are now done in the same tab - Swap rows and columns in estimates table (estimators as row names, datasets as column names) - Add a separate column for the serial interval to the estimates table - Add plots for daily and weekly data using the Plotly library - Remove italics from the subscript in all occurences of 'R_0' - Fix code/text formatting --- .../content/estimation/about-estimators.html | 31 +++++++++++++++++ .../content/estimation/about-estimators/id.html | 5 +++ .../content/estimation/about-estimators/idea.html | 1 + .../content/estimation/about-estimators/panel.html | 14 ++++++++ .../estimation/about-estimators/seq_bayes.html | 1 + .../content/estimation/about-estimators/wp.html | 1 + .../templates/content/estimation/estimates.html | 3 ++ .../estimation/estimates/add-estimators.html | 16 +++++++++ .../estimation/estimates/add-estimators/id.html | 1 + .../estimation/estimates/add-estimators/idea.html | 1 + .../estimation/estimates/add-estimators/mu.html | 22 ++++++++++++ .../estimates/add-estimators/parameters.html | 7 ++++ .../estimates/add-estimators/seq_bayes.html | 22 ++++++++++++ .../estimation/estimates/add-estimators/wp.html | 39 ++++++++++++++++++++++ .../estimation/estimates/estimates-table.html | 19 +++++++++++ 15 files changed, 183 insertions(+) create mode 100644 inst/app/templates/content/estimation/about-estimators.html create mode 100644 inst/app/templates/content/estimation/about-estimators/id.html create mode 100644 inst/app/templates/content/estimation/about-estimators/idea.html create mode 100644 inst/app/templates/content/estimation/about-estimators/panel.html create mode 100644 inst/app/templates/content/estimation/about-estimators/seq_bayes.html create mode 100644 inst/app/templates/content/estimation/about-estimators/wp.html create mode 100644 inst/app/templates/content/estimation/estimates.html create mode 100644 inst/app/templates/content/estimation/estimates/add-estimators.html create mode 100644 inst/app/templates/content/estimation/estimates/add-estimators/id.html create mode 100644 inst/app/templates/content/estimation/estimates/add-estimators/idea.html create mode 100644 inst/app/templates/content/estimation/estimates/add-estimators/mu.html create mode 100644 inst/app/templates/content/estimation/estimates/add-estimators/parameters.html create mode 100644 inst/app/templates/content/estimation/estimates/add-estimators/seq_bayes.html create mode 100644 inst/app/templates/content/estimation/estimates/add-estimators/wp.html create mode 100644 inst/app/templates/content/estimation/estimates/estimates-table.html (limited to 'inst/app/templates/content/estimation') diff --git a/inst/app/templates/content/estimation/about-estimators.html b/inst/app/templates/content/estimation/about-estimators.html new file mode 100644 index 0000000..db2898b --- /dev/null +++ b/inst/app/templates/content/estimation/about-estimators.html @@ -0,0 +1,31 @@ +
+ {{ + htmlTemplate("templates/content/estimation/about-estimators/panel.html", + id = "id", + header = "Incidence Decay (ID)", + reference_label = "Fisman et al. (PloS One, 2013)", + reference_url = "https://doi.org/10.1371/journal.pone.0083622" + ) + }} + {{ + htmlTemplate("templates/content/estimation/about-estimators/panel.html", + id = "idea", header = "Incidence Decay and Exponential Adjustment (IDEA)", + reference_label = "Fisman et al. (PloS One, 2013)", + reference_url = "https://doi.org/10.1371/journal.pone.0083622" + ) + }} + {{ + htmlTemplate("templates/content/estimation/about-estimators/panel.html", + id = "seq_bayes", header = "Sequential Bayes (seqB)", + reference_label = "Bettencourt and Riberio (PloS One, 2008)", + reference_url = "https://doi.org/10.1371/journal.pone.0002185" + ) + }} + {{ + htmlTemplate("templates/content/estimation/about-estimators/panel.html", + id = "wp", header = "White and Pagano (WP)", + reference_label = "White and Pagano (Statistics in Medicine, 2008)", + reference_url = "https://doi.org/10.1002/sim.3136" + ) + }} +
diff --git a/inst/app/templates/content/estimation/about-estimators/id.html b/inst/app/templates/content/estimation/about-estimators/id.html new file mode 100644 index 0000000..3200c00 --- /dev/null +++ b/inst/app/templates/content/estimation/about-estimators/id.html @@ -0,0 +1,5 @@ +The incidence decay (ID) estimator assumes an exponential model and finds the parameters by minimizing the sum of the +squared differences between the observed cases counts and the case counts expected based on the assumed model. +The method assumes that the serial interval is known. This means that the user needs to input the value of the serial +interval. The serial interval is the average time between the first infection and the time the first infected individual +exhibits disease symptoms. diff --git a/inst/app/templates/content/estimation/about-estimators/idea.html b/inst/app/templates/content/estimation/about-estimators/idea.html new file mode 100644 index 0000000..edfbb79 --- /dev/null +++ b/inst/app/templates/content/estimation/about-estimators/idea.html @@ -0,0 +1 @@ +This is a short description of the IDEA method. diff --git a/inst/app/templates/content/estimation/about-estimators/panel.html b/inst/app/templates/content/estimation/about-estimators/panel.html new file mode 100644 index 0000000..98fe155 --- /dev/null +++ b/inst/app/templates/content/estimation/about-estimators/panel.html @@ -0,0 +1,14 @@ +
+

+ +

+
+
+

Reference: {{ reference_label }}

+

{{ htmlTemplate(paste0("templates/content/estimation/about-estimators/", id, ".html")) }}

+
+
+
diff --git a/inst/app/templates/content/estimation/about-estimators/seq_bayes.html b/inst/app/templates/content/estimation/about-estimators/seq_bayes.html new file mode 100644 index 0000000..f6df3ee --- /dev/null +++ b/inst/app/templates/content/estimation/about-estimators/seq_bayes.html @@ -0,0 +1 @@ +This is a short description of the seqB method. diff --git a/inst/app/templates/content/estimation/about-estimators/wp.html b/inst/app/templates/content/estimation/about-estimators/wp.html new file mode 100644 index 0000000..640b44d --- /dev/null +++ b/inst/app/templates/content/estimation/about-estimators/wp.html @@ -0,0 +1 @@ +This is a short description of the WP method. diff --git a/inst/app/templates/content/estimation/estimates.html b/inst/app/templates/content/estimation/estimates.html new file mode 100644 index 0000000..bc9124e --- /dev/null +++ b/inst/app/templates/content/estimation/estimates.html @@ -0,0 +1,3 @@ +{{ htmlTemplate("templates/content/estimation/estimates/estimates-table.html") }} +
+{{ htmlTemplate("templates/content/estimation/estimates/add-estimators.html") }} diff --git a/inst/app/templates/content/estimation/estimates/add-estimators.html b/inst/app/templates/content/estimation/estimates/add-estimators.html new file mode 100644 index 0000000..60111c7 --- /dev/null +++ b/inst/app/templates/content/estimation/estimates/add-estimators.html @@ -0,0 +1,16 @@ +

Add estimators

+
+ + + + + {{ htmlTemplate("templates/content/estimation/estimates/add-estimators/parameters.html", id = "id") }} + {{ htmlTemplate("templates/content/estimation/estimates/add-estimators/parameters.html", id = "idea") }} + {{ htmlTemplate("templates/content/estimation/estimates/add-estimators/parameters.html", id = "seq_bayes") }} + {{ htmlTemplate("templates/content/estimation/estimates/add-estimators/parameters.html", id = "wp") }} +
diff --git a/inst/app/templates/content/estimation/estimates/add-estimators/id.html b/inst/app/templates/content/estimation/estimates/add-estimators/id.html new file mode 100644 index 0000000..7c35e55 --- /dev/null +++ b/inst/app/templates/content/estimation/estimates/add-estimators/id.html @@ -0,0 +1 @@ +{{ htmlTemplate("templates/content/estimation/estimates/add-estimators/mu.html", id = "id") }} diff --git a/inst/app/templates/content/estimation/estimates/add-estimators/idea.html b/inst/app/templates/content/estimation/estimates/add-estimators/idea.html new file mode 100644 index 0000000..781349f --- /dev/null +++ b/inst/app/templates/content/estimation/estimates/add-estimators/idea.html @@ -0,0 +1 @@ +{{ htmlTemplate("templates/content/estimation/estimates/add-estimators/mu.html", id = "idea") }} diff --git a/inst/app/templates/content/estimation/estimates/add-estimators/mu.html b/inst/app/templates/content/estimation/estimates/add-estimators/mu.html new file mode 100644 index 0000000..8781574 --- /dev/null +++ b/inst/app/templates/content/estimation/estimates/add-estimators/mu.html @@ -0,0 +1,22 @@ + + +
+ + + + +
+ +
+ +
diff --git a/inst/app/templates/content/estimation/estimates/add-estimators/parameters.html b/inst/app/templates/content/estimation/estimates/add-estimators/parameters.html new file mode 100644 index 0000000..5250e31 --- /dev/null +++ b/inst/app/templates/content/estimation/estimates/add-estimators/parameters.html @@ -0,0 +1,7 @@ +
+
Parameters
+ {{ htmlTemplate(paste0("templates/content/estimation/estimates/add-estimators/", id, ".html")) }} + +
diff --git a/inst/app/templates/content/estimation/estimates/add-estimators/seq_bayes.html b/inst/app/templates/content/estimation/estimates/add-estimators/seq_bayes.html new file mode 100644 index 0000000..028fabc --- /dev/null +++ b/inst/app/templates/content/estimation/estimates/add-estimators/seq_bayes.html @@ -0,0 +1,22 @@ +
+ +
+ {{ htmlTemplate("templates/content/estimation/estimates/add-estimators/mu.html", id = "seq_bayes") }} +
+ +
+ + + + + + +
+
diff --git a/inst/app/templates/content/estimation/estimates/add-estimators/wp.html b/inst/app/templates/content/estimation/estimates/add-estimators/wp.html new file mode 100644 index 0000000..511170f --- /dev/null +++ b/inst/app/templates/content/estimation/estimates/add-estimators/wp.html @@ -0,0 +1,39 @@ + + +
+
+ +
+
+ +
+
+ +
+ {{ htmlTemplate("templates/content/estimation/estimates/add-estimators/mu.html", id = "wp") }} +
+ +
+ +
+ + + +
+ +
+ + + +
+ +
+ + + +
+
diff --git a/inst/app/templates/content/estimation/estimates/estimates-table.html b/inst/app/templates/content/estimation/estimates/estimates-table.html new file mode 100644 index 0000000..4704d03 --- /dev/null +++ b/inst/app/templates/content/estimation/estimates/estimates-table.html @@ -0,0 +1,19 @@ +

Estimates table

+ +
+ {{ DT::dataTableOutput(outputId = "estimates_table") }} +
+ + + + + + + Export table + -- cgit v1.2.3