From e920b3e514e717fc05ed524267d3b53e272fec51 Mon Sep 17 00:00:00 2001 From: Naeem Model Date: Mon, 6 Jan 2025 23:55:43 +0000 Subject: Update web app entry point - Rename 'app' -> 'web' - Return shiny app object in entry point function --- inst/app/templates/content/about.html | 28 ---------------- inst/app/templates/content/data.html | 12 ------- inst/app/templates/content/data/enter-data.html | 9 ----- .../content/data/enter-data/load-samples.html | 19 ----------- .../content/data/enter-data/manual-entry.html | 11 ------ .../content/data/enter-data/required-format.html | 25 -------------- .../content/data/enter-data/upload-data.html | 12 ------- inst/app/templates/content/data/view-data.html | 3 -- .../content/data/view-data/data-plots.html | 7 ---- .../content/data/view-data/data-table.html | 18 ---------- inst/app/templates/content/estimation.html | 13 -------- .../content/estimation/about-estimators.html | 31 ----------------- .../content/estimation/about-estimators/id.html | 3 -- .../content/estimation/about-estimators/idea.html | 4 --- .../content/estimation/about-estimators/panel.html | 14 -------- .../estimation/about-estimators/seq_bayes.html | 9 ----- .../content/estimation/about-estimators/wp.html | 6 ---- .../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 ----------- inst/app/templates/content/help.html | 8 ----- inst/app/templates/content/help/panel.html | 12 ------- .../templates/content/help/serial-interval.html | 9 ----- 29 files changed, 383 deletions(-) delete mode 100644 inst/app/templates/content/about.html delete mode 100644 inst/app/templates/content/data.html delete mode 100644 inst/app/templates/content/data/enter-data.html delete mode 100644 inst/app/templates/content/data/enter-data/load-samples.html delete mode 100644 inst/app/templates/content/data/enter-data/manual-entry.html delete mode 100644 inst/app/templates/content/data/enter-data/required-format.html delete mode 100644 inst/app/templates/content/data/enter-data/upload-data.html delete mode 100644 inst/app/templates/content/data/view-data.html delete mode 100644 inst/app/templates/content/data/view-data/data-plots.html delete mode 100644 inst/app/templates/content/data/view-data/data-table.html delete mode 100644 inst/app/templates/content/estimation.html delete mode 100644 inst/app/templates/content/estimation/about-estimators.html delete mode 100644 inst/app/templates/content/estimation/about-estimators/id.html delete mode 100644 inst/app/templates/content/estimation/about-estimators/idea.html delete mode 100644 inst/app/templates/content/estimation/about-estimators/panel.html delete mode 100644 inst/app/templates/content/estimation/about-estimators/seq_bayes.html delete mode 100644 inst/app/templates/content/estimation/about-estimators/wp.html delete mode 100644 inst/app/templates/content/estimation/estimates.html delete mode 100644 inst/app/templates/content/estimation/estimates/add-estimators.html delete mode 100644 inst/app/templates/content/estimation/estimates/add-estimators/id.html delete mode 100644 inst/app/templates/content/estimation/estimates/add-estimators/idea.html delete mode 100644 inst/app/templates/content/estimation/estimates/add-estimators/mu.html delete mode 100644 inst/app/templates/content/estimation/estimates/add-estimators/parameters.html delete mode 100644 inst/app/templates/content/estimation/estimates/add-estimators/seq_bayes.html delete mode 100644 inst/app/templates/content/estimation/estimates/add-estimators/wp.html delete mode 100644 inst/app/templates/content/estimation/estimates/estimates-table.html delete mode 100644 inst/app/templates/content/help.html delete mode 100644 inst/app/templates/content/help/panel.html delete mode 100644 inst/app/templates/content/help/serial-interval.html (limited to 'inst/app/templates/content') diff --git a/inst/app/templates/content/about.html b/inst/app/templates/content/about.html deleted file mode 100644 index 73b75ea..0000000 --- a/inst/app/templates/content/about.html +++ /dev/null @@ -1,28 +0,0 @@ -

Welcome to the Rnaught web application

-

- Rnaught is an R package and web application for estimating the - basic reproduction number - of infectious diseases. For information about using this application, view the - Help tab. - To learn more about the package, visit the online - documentation or - GitHub repository. - Technical details about the estimators featured in this project can be found in the reference - article. -

-

What is the basic reproduction number?

-

- The basic reproduction number, denoted R0, is defined as the expected number of infections caused - by a single infectious individual when introduced into a totally susceptible population. It assumes that all - individuals in a given population are susceptible to the disease, and that no preventive measures (such as lockdowns - or vaccinations) have been enforced. It is a useful indicator of the transmissibility of an infectious disease during - the early stages of its spread and detection. -

-

- If R0 < 1, the disease will eventually die out. On the other hand, if - R0 > 1, the disease will spread (the higher the R0, the faster this will - happen). Due to uncertainty of known data about the disease, it is difficult to determine R0 - precisely. Therefore, many estimation methods exist, each based on different assumptions and yielding different - estimates. It is the responsibility of users to employ the most appropriate estimator (or suite of estimators) given - the situation at hand. -

diff --git a/inst/app/templates/content/data.html b/inst/app/templates/content/data.html deleted file mode 100644 index 574f003..0000000 --- a/inst/app/templates/content/data.html +++ /dev/null @@ -1,12 +0,0 @@ - -
-
- {{ htmlTemplate("templates/content/data/enter-data.html") }} -
-
- {{ htmlTemplate("templates/content/data/view-data.html") }} -
-
diff --git a/inst/app/templates/content/data/enter-data.html b/inst/app/templates/content/data/enter-data.html deleted file mode 100644 index 254f1d7..0000000 --- a/inst/app/templates/content/data/enter-data.html +++ /dev/null @@ -1,9 +0,0 @@ -
- {{ htmlTemplate("templates/content/data/enter-data/required-format.html") }} - {{ htmlTemplate("templates/content/data/enter-data/manual-entry.html") }} - {{ htmlTemplate("templates/content/data/enter-data/upload-data.html") }} -
-
-
- {{ htmlTemplate("templates/content/data/enter-data/load-samples.html") }} -
diff --git a/inst/app/templates/content/data/enter-data/load-samples.html b/inst/app/templates/content/data/enter-data/load-samples.html deleted file mode 100644 index 2a4f013..0000000 --- a/inst/app/templates/content/data/enter-data/load-samples.html +++ /dev/null @@ -1,19 +0,0 @@ -

Load samples

- -{{ - checkboxInput(inputId = "covid_canada", label = "COVID-19 Canada, 2020/03/03 - 2020/03/31 (Weekly)", - value = FALSE, width = "100%" - ) -}} -{{ - checkboxInput(inputId = "covid_ontario", label = "COVID-19 Ontario, 2020/03/03 - 2020/03/31 (Weekly)", - value = FALSE, width = "100%" - ) -}} - -
- -
- diff --git a/inst/app/templates/content/data/enter-data/manual-entry.html b/inst/app/templates/content/data/enter-data/manual-entry.html deleted file mode 100644 index a6319d9..0000000 --- a/inst/app/templates/content/data/enter-data/manual-entry.html +++ /dev/null @@ -1,11 +0,0 @@ - -
- - -
- -
- -
diff --git a/inst/app/templates/content/data/enter-data/required-format.html b/inst/app/templates/content/data/enter-data/required-format.html deleted file mode 100644 index 724dd83..0000000 --- a/inst/app/templates/content/data/enter-data/required-format.html +++ /dev/null @@ -1,25 +0,0 @@ - - - -
-
-

Manually enter rows or upload a CSV file in the following format:

-

- Dataset name,Time units,Case counts -

-

- Time units must be one of - Days or - Weeks, and - Case counts - must be a comma-separated list of one or more non-negative integers. -

-

Example:

-

- Disease A,Days,1,2,3,4,5,6,7,8,9
- Disease B,Weeks,3,1,4,1,5,2,9
- Disease C,Days,2,3,5,7,11,13,17,19 -

-
-
diff --git a/inst/app/templates/content/data/enter-data/upload-data.html b/inst/app/templates/content/data/enter-data/upload-data.html deleted file mode 100644 index 740047b..0000000 --- a/inst/app/templates/content/data/enter-data/upload-data.html +++ /dev/null @@ -1,12 +0,0 @@ - - - - -
- - -
- - diff --git a/inst/app/templates/content/data/view-data.html b/inst/app/templates/content/data/view-data.html deleted file mode 100644 index 880cf7f..0000000 --- a/inst/app/templates/content/data/view-data.html +++ /dev/null @@ -1,3 +0,0 @@ -{{ htmlTemplate("templates/content/data/view-data/data-table.html") }} -
-{{ htmlTemplate("templates/content/data/view-data/data-plots.html") }} diff --git a/inst/app/templates/content/data/view-data/data-plots.html b/inst/app/templates/content/data/view-data/data-plots.html deleted file mode 100644 index 5019088..0000000 --- a/inst/app/templates/content/data/view-data/data-plots.html +++ /dev/null @@ -1,7 +0,0 @@ -

Data plots

-
- {{ plotly::plotlyOutput(outputId = "data_plot_days") }} -
-
- {{ plotly::plotlyOutput(outputId = "data_plot_weeks") }} -
diff --git a/inst/app/templates/content/data/view-data/data-table.html b/inst/app/templates/content/data/view-data/data-table.html deleted file mode 100644 index 590a5b9..0000000 --- a/inst/app/templates/content/data/view-data/data-table.html +++ /dev/null @@ -1,18 +0,0 @@ -

Data table

-
- {{ DT::dataTableOutput(outputId = "data_table") }} -
- - - - - - - Export table - diff --git a/inst/app/templates/content/estimation.html b/inst/app/templates/content/estimation.html deleted file mode 100644 index 5764057..0000000 --- a/inst/app/templates/content/estimation.html +++ /dev/null @@ -1,13 +0,0 @@ - - -
-
- {{ htmlTemplate("templates/content/estimation/about-estimators.html") }} -
-
- {{ htmlTemplate("templates/content/estimation/estimates.html") }} -
-
diff --git a/inst/app/templates/content/estimation/about-estimators.html b/inst/app/templates/content/estimation/about-estimators.html deleted file mode 100644 index db2898b..0000000 --- a/inst/app/templates/content/estimation/about-estimators.html +++ /dev/null @@ -1,31 +0,0 @@ -
- {{ - 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 deleted file mode 100644 index fc70b1c..0000000 --- a/inst/app/templates/content/estimation/about-estimators/id.html +++ /dev/null @@ -1,3 +0,0 @@ -The Incidence Decay (ID) estimator uses the method of least squares to estimate R0. -This method assumes the serial interval is known, and is built under the SIR assumption. -We note that the use of this method might result in the underestimation of R0. diff --git a/inst/app/templates/content/estimation/about-estimators/idea.html b/inst/app/templates/content/estimation/about-estimators/idea.html deleted file mode 100644 index 67548f8..0000000 --- a/inst/app/templates/content/estimation/about-estimators/idea.html +++ /dev/null @@ -1,4 +0,0 @@ -The Incidence Decay and Exponential Adjustment (ID) estimator is an alternative formulation of the Incidence Decay (ID) model which includes a decay factor to reflect the often observed outbreak decline. -This addresses the potential underestimation of the R0 estimate when using the ID method. -The method of least squares is used to estimate R0, and similar to the ID model, the serial interval is assumed to be known and this method is developed assuming the SIR model. -We note that, since we need to obtain a minimizer of the decay factor to solve the optimization problem, we require that the number of cases in the dataset be at least 2. diff --git a/inst/app/templates/content/estimation/about-estimators/panel.html b/inst/app/templates/content/estimation/about-estimators/panel.html deleted file mode 100644 index 98fe155..0000000 --- a/inst/app/templates/content/estimation/about-estimators/panel.html +++ /dev/null @@ -1,14 +0,0 @@ -
-

- -

-
-
-

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 deleted file mode 100644 index 8f66ab4..0000000 --- a/inst/app/templates/content/estimation/about-estimators/seq_bayes.html +++ /dev/null @@ -1,9 +0,0 @@ -The sequential Bayes (seqB) estimator uses a Bayesian approach to estimate R0 which updates the reproductive number estimate as data accumulates over time. -This approach is based on the SIR model, and assumes that the mean of the serial distribution (ie. the serial interval (SI)) is known. -It is assumed that infectious counts are observed at periodic times (ie. daily, weekly). -This method cannot handle datasets where there are no new infections observed in a time interval, thus, to remedy this, -some manipulation may be necessary to make the times at which infectious counts are observed sufficiently course (ie. weeks instead of days). -Further, this method is also inappropriate in situations where long intervals between cases are observed in the initial stages of the epidemic. -Finally, the R0 approximation behaves similarly to a branching process, which means that throughout, the population size “available” to be infected remains constant. -We note that this assumption does not hold for the SIR/SEIR/SEAIR compartmental models. -As such, seqB estimates should only really be considered early on in an epidemic, ie. before the inflection point of an epidemic, if the dataset being used follows these models. diff --git a/inst/app/templates/content/estimation/about-estimators/wp.html b/inst/app/templates/content/estimation/about-estimators/wp.html deleted file mode 100644 index c6f4580..0000000 --- a/inst/app/templates/content/estimation/about-estimators/wp.html +++ /dev/null @@ -1,6 +0,0 @@ -The White and Pagano (WP) estimator uses maximum likelihood estimation to estimate R0. -In this method, the serial interval (SI) is either known, or can be estimated along with R0. -It is assumed that the number of infectious individuals are observable at discrete time points (ie. daily or weekly). -Further, this method also assumes an underlying branching process, which means that throughout, the population size “available” to be infected remains constant. -We note that this assumption does not hold for the SIR/SEIR/SEAIR compartmental models. -As such, WP estimates should only really be considered early on in an epidemic, ie. before the inflection point of an epidemic, if the dataset being used follows these models. diff --git a/inst/app/templates/content/estimation/estimates.html b/inst/app/templates/content/estimation/estimates.html deleted file mode 100644 index bc9124e..0000000 --- a/inst/app/templates/content/estimation/estimates.html +++ /dev/null @@ -1,3 +0,0 @@ -{{ 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 deleted file mode 100644 index 60111c7..0000000 --- a/inst/app/templates/content/estimation/estimates/add-estimators.html +++ /dev/null @@ -1,16 +0,0 @@ -

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 deleted file mode 100644 index 7c35e55..0000000 --- a/inst/app/templates/content/estimation/estimates/add-estimators/id.html +++ /dev/null @@ -1 +0,0 @@ -{{ 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 deleted file mode 100644 index 781349f..0000000 --- a/inst/app/templates/content/estimation/estimates/add-estimators/idea.html +++ /dev/null @@ -1 +0,0 @@ -{{ 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 deleted file mode 100644 index 8781574..0000000 --- a/inst/app/templates/content/estimation/estimates/add-estimators/mu.html +++ /dev/null @@ -1,22 +0,0 @@ - - -
- - - - -
- -
- -
diff --git a/inst/app/templates/content/estimation/estimates/add-estimators/parameters.html b/inst/app/templates/content/estimation/estimates/add-estimators/parameters.html deleted file mode 100644 index 5250e31..0000000 --- a/inst/app/templates/content/estimation/estimates/add-estimators/parameters.html +++ /dev/null @@ -1,7 +0,0 @@ -
-
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 deleted file mode 100644 index 028fabc..0000000 --- a/inst/app/templates/content/estimation/estimates/add-estimators/seq_bayes.html +++ /dev/null @@ -1,22 +0,0 @@ -
- -
- {{ 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 deleted file mode 100644 index 511170f..0000000 --- a/inst/app/templates/content/estimation/estimates/add-estimators/wp.html +++ /dev/null @@ -1,39 +0,0 @@ - - -
-
- -
-
- -
-
- -
- {{ 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 deleted file mode 100644 index 4704d03..0000000 --- a/inst/app/templates/content/estimation/estimates/estimates-table.html +++ /dev/null @@ -1,19 +0,0 @@ -

Estimates table

- -
- {{ DT::dataTableOutput(outputId = "estimates_table") }} -
- - - - - - - Export table - diff --git a/inst/app/templates/content/help.html b/inst/app/templates/content/help.html deleted file mode 100644 index df4e887..0000000 --- a/inst/app/templates/content/help.html +++ /dev/null @@ -1,8 +0,0 @@ -
- {{ - htmlTemplate("templates/content/help/panel.html", - id = "serial-interval", - header = "What is the serial interval?" - ) - }} -
diff --git a/inst/app/templates/content/help/panel.html b/inst/app/templates/content/help/panel.html deleted file mode 100644 index 9eb6e2e..0000000 --- a/inst/app/templates/content/help/panel.html +++ /dev/null @@ -1,12 +0,0 @@ -
-

- -

-
-
- {{ htmlTemplate(paste0("templates/content/help/", id, ".html")) }} -
-
-
diff --git a/inst/app/templates/content/help/serial-interval.html b/inst/app/templates/content/help/serial-interval.html deleted file mode 100644 index e061115..0000000 --- a/inst/app/templates/content/help/serial-interval.html +++ /dev/null @@ -1,9 +0,0 @@ -

Reference: Wikipedia -

- The serial interval (SI) is not one of the estimators. It is a parameter required by most of the estimators, and can - also be estimated by some of them (if not specified). -

-

- The SI is defined as the average time between successive infections in a chain of transmission (i.e., the time between - the infection of an infected individual and their subsequent transmissions). -

-- cgit v1.2.3