aboutsummaryrefslogtreecommitdiff
path: root/inst/app/templates
diff options
context:
space:
mode:
Diffstat (limited to 'inst/app/templates')
-rw-r--r--inst/app/templates/content.html4
-rw-r--r--inst/app/templates/content/about.html21
-rw-r--r--inst/app/templates/content/data.html1
-rw-r--r--inst/app/templates/content/data/enter-data.html17
-rw-r--r--inst/app/templates/content/data/enter-data/bulk-entry.html48
-rw-r--r--inst/app/templates/content/data/enter-data/entry.html48
-rw-r--r--inst/app/templates/content/data/enter-data/load-samples.html2
-rw-r--r--inst/app/templates/content/data/enter-data/manual-entry.html11
-rw-r--r--inst/app/templates/content/data/enter-data/required-format.html25
-rw-r--r--inst/app/templates/content/data/enter-data/single-entry.html39
-rw-r--r--inst/app/templates/content/data/enter-data/upload-data.html12
-rw-r--r--inst/app/templates/content/data/view-data.html22
-rw-r--r--inst/app/templates/content/data/view-data/data-plots.html7
-rw-r--r--inst/app/templates/content/data/view-data/data-table.html18
-rw-r--r--inst/app/templates/content/estimation.html13
-rw-r--r--inst/app/templates/content/estimation/about-estimators.html31
-rw-r--r--inst/app/templates/content/estimation/about-estimators/id.html5
-rw-r--r--inst/app/templates/content/estimation/about-estimators/idea.html (renamed from inst/app/templates/content/estimators/add-estimators/descriptions/idea.html)0
-rw-r--r--inst/app/templates/content/estimation/about-estimators/panel.html (renamed from inst/app/templates/content/estimators/add-estimators/components/panel.html)9
-rw-r--r--inst/app/templates/content/estimation/about-estimators/seq_bayes.html (renamed from inst/app/templates/content/estimators/add-estimators/descriptions/seq_bayes.html)0
-rw-r--r--inst/app/templates/content/estimation/about-estimators/wp.html (renamed from inst/app/templates/content/estimators/add-estimators/descriptions/wp.html)0
-rw-r--r--inst/app/templates/content/estimation/estimates.html3
-rw-r--r--inst/app/templates/content/estimation/estimates/add-estimators.html16
-rw-r--r--inst/app/templates/content/estimation/estimates/add-estimators/id.html1
-rw-r--r--inst/app/templates/content/estimation/estimates/add-estimators/idea.html1
-rw-r--r--inst/app/templates/content/estimation/estimates/add-estimators/mu.html (renamed from inst/app/templates/content/estimators/add-estimators/components/mu.html)6
-rw-r--r--inst/app/templates/content/estimation/estimates/add-estimators/parameters.html7
-rw-r--r--inst/app/templates/content/estimation/estimates/add-estimators/seq_bayes.html (renamed from inst/app/templates/content/estimators/add-estimators/parameters/seq_bayes.html)6
-rw-r--r--inst/app/templates/content/estimation/estimates/add-estimators/wp.html (renamed from inst/app/templates/content/estimators/add-estimators/parameters/wp.html)2
-rw-r--r--inst/app/templates/content/estimation/estimates/estimates-table.html19
-rw-r--r--inst/app/templates/content/estimators.html13
-rw-r--r--inst/app/templates/content/estimators/add-estimators.html19
-rw-r--r--inst/app/templates/content/estimators/add-estimators/descriptions/id.html1
-rw-r--r--inst/app/templates/content/estimators/add-estimators/descriptions/mu.html7
-rw-r--r--inst/app/templates/content/estimators/add-estimators/parameters/id.html1
-rw-r--r--inst/app/templates/content/estimators/add-estimators/parameters/idea.html1
-rw-r--r--inst/app/templates/content/estimators/add-estimators/parameters/mu.html1
-rw-r--r--inst/app/templates/content/estimators/view-estimates.html21
-rw-r--r--inst/app/templates/content/help.html10
-rw-r--r--inst/app/templates/content/help/example-help-1.html1
-rw-r--r--inst/app/templates/content/help/example-help-2.html1
-rw-r--r--inst/app/templates/content/help/serial-interval.html19
-rw-r--r--inst/app/templates/navbar.html2
-rw-r--r--inst/app/templates/tabs.html6
44 files changed, 220 insertions, 277 deletions
diff --git a/inst/app/templates/content.html b/inst/app/templates/content.html
index 8147c07..da69f08 100644
--- a/inst/app/templates/content.html
+++ b/inst/app/templates/content.html
@@ -5,8 +5,8 @@
<div id="data" class="tab-pane fade">
{{ htmlTemplate("templates/content/data.html") }}
</div>
- <div id="estimators" class="tab-pane fade">
- {{ htmlTemplate("templates/content/estimators.html") }}
+ <div id="estimation" class="tab-pane fade">
+ {{ htmlTemplate("templates/content/estimation.html") }}
</div>
<div id="help" class="tab-pane fade">
{{ htmlTemplate("templates/content/help.html") }}
diff --git a/inst/app/templates/content/about.html b/inst/app/templates/content/about.html
index d88738f..73b75ea 100644
--- a/inst/app/templates/content/about.html
+++ b/inst/app/templates/content/about.html
@@ -10,18 +10,19 @@
Technical details about the estimators featured in this project can be found in the reference
<a href="https://doi.org/10.1371/journal.pone.0269306" target="_blank">article</a>.
</p>
-
<h4>What is the basic reproduction number?</h4>
<p>
- The basic reproduction number, denoted <em>R<sub>0</sub></em>, 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.
+ The basic reproduction number, denoted <em>R</em><sub>0</sub>, 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.
</p>
<p>
- If <em>R<sub>0</sub></em> &lt; 1, the disease will eventually die out. On the other hand, if
- <em>R<sub>0</sub></em> &gt; 1, the disease will spread (the higher the <em>R<sub>0</sub></em>, the faster this will happen). Due to uncertainty of known data about the disease, it is difficult to
- determine <em>R<sub>0</sub></em> 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.
+ If <em>R</em><sub>0</sub> &lt; 1, the disease will eventually die out. On the other hand, if
+ <em>R</em><sub>0</sub> &gt; 1, the disease will spread (the higher the <em>R</em><sub>0</sub>, the faster this will
+ happen). Due to uncertainty of known data about the disease, it is difficult to determine <em>R</em><sub>0</sub>
+ 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.
</p>
diff --git a/inst/app/templates/content/data.html b/inst/app/templates/content/data.html
index eaae571..574f003 100644
--- a/inst/app/templates/content/data.html
+++ b/inst/app/templates/content/data.html
@@ -2,7 +2,6 @@
<a class="nav-link active" data-bs-toggle="tab" href="#enter-data">Enter data</a>
<a class="nav-link" data-bs-toggle="tab" href="#view-data">View data</a>
</nav>
-
<div class="container-fluid tab-content">
<div id="enter-data" class="pt-3 tab-pane fade show active">
{{ htmlTemplate("templates/content/data/enter-data.html") }}
diff --git a/inst/app/templates/content/data/enter-data.html b/inst/app/templates/content/data/enter-data.html
index 77846fa..254f1d7 100644
--- a/inst/app/templates/content/data/enter-data.html
+++ b/inst/app/templates/content/data/enter-data.html
@@ -1,8 +1,9 @@
-
-<form class="mb-5">
- {{ htmlTemplate("templates/content/data/enter-data/entry.html") }}
-</form>
-<hr>
-<form>
- {{ htmlTemplate("templates/content/data/enter-data/load-samples.html") }}
-</form>
+<form class="mb-5">
+ {{ 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") }}
+</form>
+<hr>
+<form>
+ {{ htmlTemplate("templates/content/data/enter-data/load-samples.html") }}
+</form>
diff --git a/inst/app/templates/content/data/enter-data/bulk-entry.html b/inst/app/templates/content/data/enter-data/bulk-entry.html
deleted file mode 100644
index 30fab06..0000000
--- a/inst/app/templates/content/data/enter-data/bulk-entry.html
+++ /dev/null
@@ -1,48 +0,0 @@
-<h4 class="mb-3">Bulk entry</h4>
-<!-- Button to toggle help text. -->
-<button type="button" class="btn btn-outline-primary btn-sm" id="bulk-help-toggle"
- data-bs-toggle="collapse" data-bs-target="#bulk-help">Show required format</button>
-<!-- Help text for bulk input format. -->
-<div class="collapse mt-2" id="bulk-help">
- <div class="card card-body border-primary">
- <p>Manually enter rows or upload a CSV file in the following format:</p>
- <p class="overflow-x-scroll text-nowrap font-monospace">
- <u>Dataset name</u>,<u>Time units</u>,<u>Case counts</u>
- </p>
- <p>
- <u class="font-monospace">Time units</u> must be one of
- <u class="font-monospace">Days</u> or
- <u class="font-monospace">Weeks</u>, and
- <u class="font-monospace">Case counts</u>
- must be a comma-separated list of one or more non-negative integers.
- </p>
- <p>Example:</p>
- <p class="overflow-x-scroll text-nowrap font-monospace lh-sm">
- Montreal,Days,1,2,3,4,5,6,7,8,9,19<br>
- Ottawa,Weeks,1,2,3,4,5,6,7,8,9,19<br>
- Toronto,Days,1,2,3,4,5,6,7,8,9,19
- </p>
- </div>
-</div>
-<!-- Data input area. -->
-<div class="my-4">
- <label class="form-label" for="data_area">Enter manually</label>
- <textarea id="data_area" class="form-control" rows="3" wrap="off"></textarea>
- <div>
- <small id="data_area_warn" class="form-text text-primary shiny-html-output"></small>
- </div>
- <button id="data_bulk" type="button" class="btn btn-outline-primary btn-sm action-button mt-3">
- <span class="glyphicon glyphicon-plus"></span> Add
- </button>
-</div>
-<!-- File input for data upload (hidden). -->
-<input class="form-control" type="file" id="data_upload" accept="text/csv,text/comma-separated-values,text/plain,.csv">
-<!-- Custom button to trigger file selector for data upload (visible). -->
-<label class="form-label" for="data-upload-select">Upload a CSV file</label>
-<div class="input-group">
- <button id="data-upload-select" type="button" class="btn btn-outline-primary btn-sm">
- <span class="glyphicon glyphicon-file"></span> Select file
- </button>
- <input type="text" id="data-upload-name" class="form-control" placeholder="No file selected" disabled>
-</div>
-<small id="data_upload_warn" class="form-text text-primary shiny-html-output"></small>
diff --git a/inst/app/templates/content/data/enter-data/entry.html b/inst/app/templates/content/data/enter-data/entry.html
deleted file mode 100644
index be43625..0000000
--- a/inst/app/templates/content/data/enter-data/entry.html
+++ /dev/null
@@ -1,48 +0,0 @@
-
-<!-- Button to toggle help text. -->
-<button type="button" class="btn btn-outline-primary btn-sm" id="bulk-help-toggle"
- data-bs-toggle="collapse" data-bs-target="#bulk-help">Show required format</button>
-<!-- Help text for bulk input format. -->
-<div class="collapse mt-2" id="bulk-help">
- <div class="card card-body border-primary">
- <p>Manually enter rows or upload a CSV file in the following format:</p>
- <p class="overflow-x-scroll text-nowrap font-monospace">
- <u>Dataset name</u>,<u>Time units</u>,<u>Case counts</u>
- </p>
- <p>
- <u class="font-monospace">Time units</u> must be one of
- <u class="font-monospace">Days</u> or
- <u class="font-monospace">Weeks</u>, and
- <u class="font-monospace">Case counts</u>
- must be a comma-separated list of one or more non-negative integers.
- </p>
- <p>Example:</p>
- <p class="overflow-x-scroll text-nowrap font-monospace lh-sm">
- Montreal,Days,1,2,3,4,5,6,7,8,9,19<br>
- Ottawa,Weeks,1,2,3,4,5,6,7,8,9,19<br>
- Toronto,Days,1,2,3,4,5,6,7,8,9,19
- </p>
- </div>
-</div>
-<!-- Data input area. -->
-<div class="my-4">
- <label class="form-label" for="data_area">Enter manually</label>
- <textarea id="data_area" class="form-control" rows="3" wrap="off"></textarea>
- <div>
- <small id="data_area_warn" class="form-text text-primary shiny-html-output"></small>
- </div>
- <button id="data_bulk" type="button" class="btn btn-outline-primary btn-sm action-button mt-3">
- <span class="glyphicon glyphicon-plus"></span> Add
- </button>
-</div>
-<!-- File input for data upload (hidden). -->
-<input class="form-control" type="file" id="data_upload" accept="text/csv,text/comma-separated-values,text/plain,.csv">
-<!-- Custom button to trigger file selector for data upload (visible). -->
-<label class="form-label" for="data-upload-select">Upload a CSV file</label>
-<div class="input-group">
- <button id="data-upload-select" type="button" class="btn btn-outline-primary btn-sm">
- <span class="glyphicon glyphicon-file"></span> Select file
- </button>
- <input type="text" id="data-upload-name" class="form-control" placeholder="No file selected" disabled>
-</div>
-<small id="data_upload_warn" class="form-text text-primary shiny-html-output"></small>
diff --git a/inst/app/templates/content/data/enter-data/load-samples.html b/inst/app/templates/content/data/enter-data/load-samples.html
index a42a8c8..2a4f013 100644
--- a/inst/app/templates/content/data/enter-data/load-samples.html
+++ b/inst/app/templates/content/data/enter-data/load-samples.html
@@ -1,4 +1,5 @@
<h4 class="mb-3">Load samples</h4>
+<!-- Checkboxes for sample data. -->
{{
checkboxInput(inputId = "covid_canada", label = "COVID-19 Canada, 2020/03/03 - 2020/03/31 (Weekly)",
value = FALSE, width = "100%"
@@ -9,6 +10,7 @@
value = FALSE, width = "100%"
)
}}
+<!-- Warning text. -->
<div>
<small id="data_samples_warn" class="form-text text-primary shiny-text-output"></small>
</div>
diff --git a/inst/app/templates/content/data/enter-data/manual-entry.html b/inst/app/templates/content/data/enter-data/manual-entry.html
new file mode 100644
index 0000000..a6319d9
--- /dev/null
+++ b/inst/app/templates/content/data/enter-data/manual-entry.html
@@ -0,0 +1,11 @@
+<!-- Data input area (manual entry). -->
+<div class="my-4">
+ <label class="form-label" for="data_area">Enter manually</label>
+ <textarea id="data_area" class="form-control" rows="3" wrap="off"></textarea>
+ <div>
+ <small id="data_area_warn" class="form-text text-primary shiny-html-output"></small>
+ </div>
+ <button id="data_bulk" type="button" class="btn btn-outline-primary btn-sm action-button mt-3">
+ <span class="glyphicon glyphicon-plus"></span> Add
+ </button>
+</div>
diff --git a/inst/app/templates/content/data/enter-data/required-format.html b/inst/app/templates/content/data/enter-data/required-format.html
new file mode 100644
index 0000000..724dd83
--- /dev/null
+++ b/inst/app/templates/content/data/enter-data/required-format.html
@@ -0,0 +1,25 @@
+<!-- Button to toggle help text. -->
+<button type="button" class="btn btn-outline-primary btn-sm" id="data-format-toggle"
+ data-bs-toggle="collapse" data-bs-target="#data-format">Show required format</button>
+<!-- Help text for data input format. -->
+<div class="collapse mt-2" id="data-format">
+ <div class="card card-body border-primary">
+ <p>Manually enter rows or upload a CSV file in the following format:</p>
+ <p class="overflow-x-scroll text-nowrap font-monospace">
+ <u>Dataset name</u>,<u>Time units</u>,<u>Case counts</u>
+ </p>
+ <p>
+ <u class="font-monospace">Time units</u> must be one of
+ <u class="font-monospace">Days</u> or
+ <u class="font-monospace">Weeks</u>, and
+ <u class="font-monospace">Case counts</u>
+ must be a comma-separated list of one or more non-negative integers.
+ </p>
+ <p>Example:</p>
+ <p class="overflow-x-scroll text-nowrap font-monospace lh-sm">
+ Disease A,Days,1,2,3,4,5,6,7,8,9<br>
+ Disease B,Weeks,3,1,4,1,5,2,9<br>
+ Disease C,Days,2,3,5,7,11,13,17,19
+ </p>
+ </div>
+</div>
diff --git a/inst/app/templates/content/data/enter-data/single-entry.html b/inst/app/templates/content/data/enter-data/single-entry.html
deleted file mode 100644
index 9f249d9..0000000
--- a/inst/app/templates/content/data/enter-data/single-entry.html
+++ /dev/null
@@ -1,39 +0,0 @@
-<h4>Single entry</h4>
-<!-- Dataset name. -->
-<div class="my-3">
- <label class="form-label" for="data_name">Dataset name</label>
- <input name="data_name" class="form-control" type="text">
- <small id="data_name_warn" class="form-text text-primary shiny-text-output"></small>
-</div>
-<!-- Case counts. -->
-<div class="mb-3">
- <label class="form-label" for="data_counts">
- Case counts
- <sup data-bs-toggle="tooltip" data-bs-placement="right"
- data-bs-title="Enter as a comma-separated list of non-negative integers (example: 0,1,1,2,3,5,8,13).">
- [?]
- </sup>
- </label>
- <input name="data_counts" class="form-control" type="text">
- <small id="data_counts_warn" class="form-text text-primary shiny-text-output"></small>
-</div>
-<!-- Time units. -->
-<div class="mb-3">
- <label class="form-label" for="data_units">Time units</label>
- <div class="shiny-input-radiogroup" id="data_units">
- <div class="form-check form-check-inline">
- <label class="form-check-label">
- <input type="radio" class="form-check-input me-2" name="data_units" value="Days">Days
- </label>
- </div>
- <div class="form-check form-check-inline">
- <label class="form-check-label">
- <input type="radio" class="form-check-input me-2" name="data_units" value="Weeks" checked>Weeks
- </label>
- </div>
- </div>
-</div>
-<!-- Submit data. -->
-<button id="data_single" type="button" class="btn btn-outline-primary btn-sm action-button">
- <span class="glyphicon glyphicon-plus"></span> Add
-</button>
diff --git a/inst/app/templates/content/data/enter-data/upload-data.html b/inst/app/templates/content/data/enter-data/upload-data.html
new file mode 100644
index 0000000..740047b
--- /dev/null
+++ b/inst/app/templates/content/data/enter-data/upload-data.html
@@ -0,0 +1,12 @@
+<!-- File input for data upload (hidden). -->
+<input class="form-control" type="file" id="data_upload" accept="text/csv,text/comma-separated-values,text/plain,.csv">
+<!-- Custom button to trigger file selector for data upload (visible). -->
+<label class="form-label" for="data-upload-select">Upload a CSV file</label>
+<div class="input-group">
+ <button id="data-upload-select" type="button" class="btn btn-outline-primary btn-sm">
+ <span class="glyphicon glyphicon-file"></span> Select file
+ </button>
+ <input type="text" id="data-upload-name" class="form-control" placeholder="No file selected" disabled>
+</div>
+<!-- Warning text. -->
+<small id="data_upload_warn" class="form-text text-primary shiny-html-output"></small>
diff --git a/inst/app/templates/content/data/view-data.html b/inst/app/templates/content/data/view-data.html
index 52f1e85..880cf7f 100644
--- a/inst/app/templates/content/data/view-data.html
+++ b/inst/app/templates/content/data/view-data.html
@@ -1,19 +1,3 @@
-<h4>Data table</h4>
-<!-- Data table. -->
-<div class="my-3">
- {{ DT::dataTableOutput(outputId = "data_table") }}
-</div>
-<!-- Display inactive delete button when no rows are selected. -->
-<button type="button" class="btn btn-primary btn-sm text-white" disabled
- data-display-if="'data_table_rows_selected' in input && input.data_table_rows_selected.length == 0">
- <span class="glyphicon glyphicon-remove"></span> Delete row(s)
-</button>
-<!-- Display active delete button when at least one row is selected. -->
-<button id="data_delete" type="button" class="btn btn-primary btn-sm action-button text-white"
- data-display-if="'data_table_rows_selected' in input && input.data_table_rows_selected.length != 0">
- <span class="glyphicon glyphicon-remove"></span> Delete row(s)
-</button>
-<!-- Button to export data table as a CSV file. -->
-<a id="data_export" type="button" class="btn btn-outline-primary btn-sm shiny-download-link">
- <span class="glyphicon glyphicon-download-alt"></span> Export table
-</a>
+{{ htmlTemplate("templates/content/data/view-data/data-table.html") }}
+<hr>
+{{ 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
new file mode 100644
index 0000000..5019088
--- /dev/null
+++ b/inst/app/templates/content/data/view-data/data-plots.html
@@ -0,0 +1,7 @@
+<h4>Data plots</h4>
+<div class="container my-5">
+ {{ plotly::plotlyOutput(outputId = "data_plot_days") }}
+</div>
+<div class="container">
+ {{ plotly::plotlyOutput(outputId = "data_plot_weeks") }}
+</div>
diff --git a/inst/app/templates/content/data/view-data/data-table.html b/inst/app/templates/content/data/view-data/data-table.html
new file mode 100644
index 0000000..590a5b9
--- /dev/null
+++ b/inst/app/templates/content/data/view-data/data-table.html
@@ -0,0 +1,18 @@
+<h4>Data table</h4>
+<div class="my-3">
+ {{ DT::dataTableOutput(outputId = "data_table") }}
+</div>
+<!-- Display inactive delete button when no rows are selected. -->
+<button type="button" class="btn btn-primary btn-sm text-white" disabled
+ data-display-if="'data_table_rows_selected' in input && input.data_table_rows_selected.length == 0">
+ <span class="glyphicon glyphicon-remove"></span> Delete row(s)
+</button>
+<!-- Display active delete button when at least one row is selected. -->
+<button id="data_delete" type="button" class="btn btn-primary btn-sm action-button text-white"
+ data-display-if="'data_table_rows_selected' in input && input.data_table_rows_selected.length != 0">
+ <span class="glyphicon glyphicon-remove"></span> Delete row(s)
+</button>
+<!-- Button to export data table as a CSV file. -->
+<a id="data_export" type="button" class="btn btn-outline-primary btn-sm shiny-download-link">
+ <span class="glyphicon glyphicon-download-alt"></span> Export table
+</a>
diff --git a/inst/app/templates/content/estimation.html b/inst/app/templates/content/estimation.html
new file mode 100644
index 0000000..5764057
--- /dev/null
+++ b/inst/app/templates/content/estimation.html
@@ -0,0 +1,13 @@
+<nav class="nav nav-tabs">
+ <a class="nav-link active" data-bs-toggle="tab" href="#about-estimators">About the estimators</a>
+ <a class="nav-link" data-bs-toggle="tab" href="#estimates">Compute and view estimates</a>
+</nav>
+
+<div class="container-fluid tab-content">
+ <div id="about-estimators" class="pt-3 tab-pane fade show active">
+ {{ htmlTemplate("templates/content/estimation/about-estimators.html") }}
+ </div>
+ <div id="estimates" class="pt-3 tab-pane fade">
+ {{ htmlTemplate("templates/content/estimation/estimates.html") }}
+ </div>
+</div>
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 @@
+<div class="accordion accordion-flush" id="estimation-accordion">
+ {{
+ 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"
+ )
+ }}
+</div>
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/estimators/add-estimators/descriptions/idea.html b/inst/app/templates/content/estimation/about-estimators/idea.html
index edfbb79..edfbb79 100644
--- a/inst/app/templates/content/estimators/add-estimators/descriptions/idea.html
+++ b/inst/app/templates/content/estimation/about-estimators/idea.html
diff --git a/inst/app/templates/content/estimators/add-estimators/components/panel.html b/inst/app/templates/content/estimation/about-estimators/panel.html
index b1e0378..98fe155 100644
--- a/inst/app/templates/content/estimators/add-estimators/components/panel.html
+++ b/inst/app/templates/content/estimation/about-estimators/panel.html
@@ -8,14 +8,7 @@
<div id="{{ id }}" class="accordion-collapse collapse" data-bs-parent="#estimators-accordion">
<div class="accordion-body">
<p>Reference: <a href="{{ reference_url }}" target="_blank"><em>{{ reference_label }}</em></a></p>
- <p>{{ htmlTemplate(paste0("templates/content/estimators/add-estimators/descriptions/", id, ".html")) }}</p>
- <h5>Parameters</h5>
- <form class="my-3">
- {{ htmlTemplate(paste0("templates/content/estimators/add-estimators/parameters/", id, ".html")) }}
- </form>
- <button id="add_{{ id }}" type="button" class="btn btn-outline-primary btn-sm action-button">
- <span class="glyphicon glyphicon-plus"></span> Add
- </button>
+ <p>{{ htmlTemplate(paste0("templates/content/estimation/about-estimators/", id, ".html")) }}</p>
</div>
</div>
</div>
diff --git a/inst/app/templates/content/estimators/add-estimators/descriptions/seq_bayes.html b/inst/app/templates/content/estimation/about-estimators/seq_bayes.html
index f6df3ee..f6df3ee 100644
--- a/inst/app/templates/content/estimators/add-estimators/descriptions/seq_bayes.html
+++ b/inst/app/templates/content/estimation/about-estimators/seq_bayes.html
diff --git a/inst/app/templates/content/estimators/add-estimators/descriptions/wp.html b/inst/app/templates/content/estimation/about-estimators/wp.html
index 640b44d..640b44d 100644
--- a/inst/app/templates/content/estimators/add-estimators/descriptions/wp.html
+++ b/inst/app/templates/content/estimation/about-estimators/wp.html
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") }}
+<hr>
+{{ 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 @@
+<h4>Add estimators</h4>
+<form class="my-3">
+ <!-- Dropdown to select estimator. -->
+ <label class="form-label" for="estimator_select">Select estimator:</label>
+ <select name="estimator_select" class="form-select">
+ <option value="id" selected>Incidence Decay (ID)</option>
+ <option value="idea">Incidence Decay and Exponential Adjustment (IDEA)</option>
+ <option value="seq_bayes">Sequential Bayes (seqB)</option>
+ <option value="wp">White and Pagano (WP)</option>
+ </select>
+ <!-- Parameters. -->
+ {{ 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") }}
+</form>
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/estimators/add-estimators/components/mu.html b/inst/app/templates/content/estimation/estimates/add-estimators/mu.html
index f25a1c8..8781574 100644
--- a/inst/app/templates/content/estimators/add-estimators/components/mu.html
+++ b/inst/app/templates/content/estimation/estimates/add-estimators/mu.html
@@ -1,6 +1,6 @@
<!-- Serial interval label and help tooltip. -->
<label class="form-label" for="mu_{{ id }}">
- Serial interval (&#956;)
+ Serial interval
<sup data-bs-toggle="tooltip" data-bs-placement="right"
data-bs-title="The serial interval is the time between when an infected individual (the infector) becomes
symptomatic, to when another individual (who is infected by the infector) becomes symptomatic.">
@@ -17,4 +17,6 @@
</select>
</div>
<!-- Warning text for incorrect values. -->
-<small id="mu_{{ id }}_warn" class="form-text text-primary shiny-text-output"></small>
+<div>
+ <small id="mu_{{ id }}_warn" class="form-text text-primary shiny-text-output"></small>
+</div>
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 @@
+<div class="my-4" data-display-if="input.estimator_select === '{{ id }}'">
+ <h5>Parameters</h5>
+ {{ htmlTemplate(paste0("templates/content/estimation/estimates/add-estimators/", id, ".html")) }}
+ <button id="add_{{ id }}" type="button" class="btn btn-outline-primary btn-sm action-button mt-3">
+ <span class="glyphicon glyphicon-plus"></span> Add
+ </button>
+</div>
diff --git a/inst/app/templates/content/estimators/add-estimators/parameters/seq_bayes.html b/inst/app/templates/content/estimation/estimates/add-estimators/seq_bayes.html
index bcc82b7..028fabc 100644
--- a/inst/app/templates/content/estimators/add-estimators/parameters/seq_bayes.html
+++ b/inst/app/templates/content/estimation/estimates/add-estimators/seq_bayes.html
@@ -1,7 +1,7 @@
<div class="row">
<!-- Serial interval (mu). -->
<div class="col-md">
- {{ htmlTemplate("templates/content/estimators/add-estimators/components/mu.html", id = "seq_bayes") }}
+ {{ htmlTemplate("templates/content/estimation/estimates/add-estimators/mu.html", id = "seq_bayes") }}
</div>
<!-- Maximum value of the uniform prior (kappa). -->
<div class="col-md mt-2 mt-md-0">
@@ -9,8 +9,8 @@
<label class="form-label" for="kappa">
Maximum prior (&#954;)
<sup data-bs-toggle="tooltip" data-bs-placement="right" data-bs-html="true"
- data-bs-title="The initial maximum belief of <em>R<sub>0</sub></em>. The higher this value, the higher
- <em>R<sub>0</sub></em> is believed to be prior to the estimation.">
+ data-bs-title="The initial maximum belief of <em>R</em><sub>0</sub>. The higher this value, the higher
+ <em>R</em><sub>0</sub> is believed to be prior to the estimation.">
[?]
</sup>
</label>
diff --git a/inst/app/templates/content/estimators/add-estimators/parameters/wp.html b/inst/app/templates/content/estimation/estimates/add-estimators/wp.html
index b789a23..511170f 100644
--- a/inst/app/templates/content/estimators/add-estimators/parameters/wp.html
+++ b/inst/app/templates/content/estimation/estimates/add-estimators/wp.html
@@ -14,7 +14,7 @@
</div>
<!-- Show the input field for the serial interval if it is known. -->
<div data-display-if="input.wp_mu_known == 'Yes'" class="mt-2 mt-md-0">
- {{ htmlTemplate("templates/content/estimators/add-estimators/components/mu.html", id = "wp") }}
+ {{ htmlTemplate("templates/content/estimation/estimates/add-estimators/mu.html", id = "wp") }}
</div>
<!-- Show the input fields for the grid search parameters if the serial interval is unknown. -->
<div data-display-if="input.wp_mu_known == 'No'" class="row">
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 @@
+<h4>Estimates table</h4>
+<!-- Estimates table. -->
+<div class="my-3">
+ {{ DT::dataTableOutput(outputId = "estimates_table") }}
+</div>
+<!-- Display inactive delete button when no rows are selected. -->
+<button type="button" class="btn btn-primary btn-sm text-white" disabled
+ data-display-if="'estimates_table_rows_selected' in input && input.estimates_table_rows_selected.length == 0">
+ <span class="glyphicon glyphicon-remove"></span> Delete row(s)
+</button>
+<!-- Display active delete button when at least one row is selected. -->
+<button id="estimators_delete" type="button" class="btn btn-primary btn-sm action-button text-white"
+ data-display-if="'estimates_table_rows_selected' in input && input.estimates_table_rows_selected.length != 0">
+ <span class="glyphicon glyphicon-remove"></span> Delete row(s)
+</button>
+<!-- Button to export estimates table as a CSV file. -->
+<a id="estimates_export" type="button" class="btn btn-outline-primary btn-sm shiny-download-link">
+ <span class="glyphicon glyphicon-download-alt"></span> Export table
+</a>
diff --git a/inst/app/templates/content/estimators.html b/inst/app/templates/content/estimators.html
deleted file mode 100644
index 133241a..0000000
--- a/inst/app/templates/content/estimators.html
+++ /dev/null
@@ -1,13 +0,0 @@
-<nav class="nav nav-tabs">
- <a class="nav-link active" data-bs-toggle="tab" href="#add-estimators">About the estimators</a>
- <a class="nav-link" data-bs-toggle="tab" href="#view-estimates">Select and compute estimates</a>
-</nav>
-
-<div class="container-fluid tab-content">
- <div id="add-estimators" class="pt-3 tab-pane fade show active">
- {{ htmlTemplate("templates/content/estimators/add-estimators.html") }}
- </div>
- <div id="view-estimates" class="pt-3 tab-pane fade">
- {{ htmlTemplate("templates/content/estimators/view-estimates.html") }}
- </div>
-</div>
diff --git a/inst/app/templates/content/estimators/add-estimators.html b/inst/app/templates/content/estimators/add-estimators.html
deleted file mode 100644
index 0d7562e..0000000
--- a/inst/app/templates/content/estimators/add-estimators.html
+++ /dev/null
@@ -1,19 +0,0 @@
-<div class="accordion accordion-flush" id="estimators-accordion">
- {{
- htmlTemplate("templates/content/estimators/add-estimators/components/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/estimators/add-estimators/components/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/estimators/add-estimators/components/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/estimators/add-estimators/components/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" ) }}
-</div>
diff --git a/inst/app/templates/content/estimators/add-estimators/descriptions/id.html b/inst/app/templates/content/estimators/add-estimators/descriptions/id.html
deleted file mode 100644
index b47850f..0000000
--- a/inst/app/templates/content/estimators/add-estimators/descriptions/id.html
+++ /dev/null
@@ -1 +0,0 @@
-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/estimators/add-estimators/descriptions/mu.html b/inst/app/templates/content/estimators/add-estimators/descriptions/mu.html
deleted file mode 100644
index 6e7bfe9..0000000
--- a/inst/app/templates/content/estimators/add-estimators/descriptions/mu.html
+++ /dev/null
@@ -1,7 +0,0 @@
-The serial interval (SI) is NOT one of the estimators.
-
-<p>The SI is a parameter required by all of the estimators, and can also be estimated by the WP method.</p>
-
-<p>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 and their subsequent transmissions. </p>
-
-<P> Make the tab a different shade (light gray) and then this won't have parameters. It will let us not have to explain SI every single time. We'll expand the description later.</p>
diff --git a/inst/app/templates/content/estimators/add-estimators/parameters/id.html b/inst/app/templates/content/estimators/add-estimators/parameters/id.html
deleted file mode 100644
index a3159ca..0000000
--- a/inst/app/templates/content/estimators/add-estimators/parameters/id.html
+++ /dev/null
@@ -1 +0,0 @@
-{{ htmlTemplate("templates/content/estimators/add-estimators/components/mu.html", id = "id") }}
diff --git a/inst/app/templates/content/estimators/add-estimators/parameters/idea.html b/inst/app/templates/content/estimators/add-estimators/parameters/idea.html
deleted file mode 100644
index 379be84..0000000
--- a/inst/app/templates/content/estimators/add-estimators/parameters/idea.html
+++ /dev/null
@@ -1 +0,0 @@
-{{ htmlTemplate("templates/content/estimators/add-estimators/components/mu.html", id = "idea") }}
diff --git a/inst/app/templates/content/estimators/add-estimators/parameters/mu.html b/inst/app/templates/content/estimators/add-estimators/parameters/mu.html
deleted file mode 100644
index a3159ca..0000000
--- a/inst/app/templates/content/estimators/add-estimators/parameters/mu.html
+++ /dev/null
@@ -1 +0,0 @@
-{{ htmlTemplate("templates/content/estimators/add-estimators/components/mu.html", id = "id") }}
diff --git a/inst/app/templates/content/estimators/view-estimates.html b/inst/app/templates/content/estimators/view-estimates.html
deleted file mode 100644
index e81fff6..0000000
--- a/inst/app/templates/content/estimators/view-estimates.html
+++ /dev/null
@@ -1,21 +0,0 @@
-<h4>Estimates table</h4>
-<!-- Estimates table. -->
-<div class="my-3">
- {{ DT::dataTableOutput(outputId = "estimates_table") }}
-</div>
-<!-- Display inactive delete button when no columns are selected. -->
-<button type="button" class="btn btn-primary btn-sm text-white" disabled
- data-display-if="'estimates_table_columns_selected' in input &&
- input.estimates_table_columns_selected.length == 0">
- <span class="glyphicon glyphicon-remove"></span> Delete column(s)
-</button>
-<!-- Display active delete button when at least one column is selected. -->
-<button id="estimators_delete" type="button" class="btn btn-primary btn-sm action-button text-white"
- data-display-if="'estimates_table_columns_selected' in input &&
- input.estimates_table_columns_selected.length != 0">
- <span class="glyphicon glyphicon-remove"></span> Delete column(s)
-</button>
-<!-- Button to export estimates table as a CSV file. -->
-<a id="estimates_export" type="button" class="btn btn-outline-primary btn-sm shiny-download-link">
- <span class="glyphicon glyphicon-download-alt"></span> Export table
-</a>
diff --git a/inst/app/templates/content/help.html b/inst/app/templates/content/help.html
index 51192fc..df4e887 100644
--- a/inst/app/templates/content/help.html
+++ b/inst/app/templates/content/help.html
@@ -1,6 +1,8 @@
<div class="accordion accordion-flush" id="help-accordion">
- {{ htmlTemplate("templates/content/help/panel.html", id = "serial-interval",
- header = "What is a Serial Interval(mu) ?" ) }} {{
- htmlTemplate("templates/content/help/panel.html", id = "example-help-2",
- header = "Example help 2" ) }}
+ {{
+ htmlTemplate("templates/content/help/panel.html",
+ id = "serial-interval",
+ header = "What is the serial interval?"
+ )
+ }}
</div>
diff --git a/inst/app/templates/content/help/example-help-1.html b/inst/app/templates/content/help/example-help-1.html
deleted file mode 100644
index 245b9b6..0000000
--- a/inst/app/templates/content/help/example-help-1.html
+++ /dev/null
@@ -1 +0,0 @@
-Example help 1
diff --git a/inst/app/templates/content/help/example-help-2.html b/inst/app/templates/content/help/example-help-2.html
deleted file mode 100644
index a4817b5..0000000
--- a/inst/app/templates/content/help/example-help-2.html
+++ /dev/null
@@ -1 +0,0 @@
-Example help 2
diff --git a/inst/app/templates/content/help/serial-interval.html b/inst/app/templates/content/help/serial-interval.html
index 88bf82c..e061115 100644
--- a/inst/app/templates/content/help/serial-interval.html
+++ b/inst/app/templates/content/help/serial-interval.html
@@ -1,18 +1,9 @@
-Reference
-<a href="https://en.wikipedia.org/wiki/Serial_interval" target="_blank"
- ><i>Wikipedia</i></a
->
-<br />
-<br />
-
-<p>The serial interval (SI) is NOT one of the estimators.</p>
+<p>Reference: <a href="https://en.wikipedia.org/wiki/Serial_interval" target="_blank"><em>Wikipedia</em></a>
<p>
- The SI is a parameter required by all of the estimators, and can also be
- estimated by the WP method.
+ 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).
</p>
-
<p>
- 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 and their
- subsequent transmissions.
+ 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).
</p>
diff --git a/inst/app/templates/navbar.html b/inst/app/templates/navbar.html
index 1f86953..d447fba 100644
--- a/inst/app/templates/navbar.html
+++ b/inst/app/templates/navbar.html
@@ -3,7 +3,7 @@
<!-- Project name and description. -->
<a class="navbar-brand text-primary" href="/">Rnaught Web</a>
<span class="navbar-text d-none d-md-block">
- An estimation suite for <em>R<sub>0</sub></em>
+ An estimation suite for <em>R</em><sub>0</sub>
</span>
<!-- Navigation toggler for smaller screens. -->
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#nav-toggle">
diff --git a/inst/app/templates/tabs.html b/inst/app/templates/tabs.html
index 22985f9..351b480 100644
--- a/inst/app/templates/tabs.html
+++ b/inst/app/templates/tabs.html
@@ -3,10 +3,10 @@
About <span class="glyphicon glyphicon-info-sign"></span>
</a>
<a class="nav-link rounded-0" data-bs-toggle="pill" href="#data">
- Upload Data <span class="glyphicon glyphicon-list-alt"></span>
+ Data <span class="glyphicon glyphicon-list-alt"></span>
</a>
- <a class="nav-link rounded-0" data-bs-toggle="pill" href="#estimators">
- Select and Compute Estimators <span class="glyphicon glyphicon-random"></span>
+ <a class="nav-link rounded-0" data-bs-toggle="pill" href="#estimation">
+ Estimation <span class="glyphicon glyphicon-random"></span>
</a>
<a class="nav-link rounded-0" data-bs-toggle="pill" href="#help">
Help <span class="glyphicon glyphicon-question-sign"></span>