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/web/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/web/templates/content/data/view-data.html | 3 +++ .../content/data/view-data/data-plots.html | 7 ++++++ .../content/data/view-data/data-table.html | 18 ++++++++++++++++ 8 files changed, 104 insertions(+) create mode 100644 inst/web/templates/content/data/enter-data.html create mode 100644 inst/web/templates/content/data/enter-data/load-samples.html create mode 100644 inst/web/templates/content/data/enter-data/manual-entry.html create mode 100644 inst/web/templates/content/data/enter-data/required-format.html create mode 100644 inst/web/templates/content/data/enter-data/upload-data.html create mode 100644 inst/web/templates/content/data/view-data.html create mode 100644 inst/web/templates/content/data/view-data/data-plots.html create mode 100644 inst/web/templates/content/data/view-data/data-table.html (limited to 'inst/web/templates/content/data') diff --git a/inst/web/templates/content/data/enter-data.html b/inst/web/templates/content/data/enter-data.html new file mode 100644 index 0000000..254f1d7 --- /dev/null +++ b/inst/web/templates/content/data/enter-data.html @@ -0,0 +1,9 @@ +
+ {{ 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/web/templates/content/data/enter-data/load-samples.html b/inst/web/templates/content/data/enter-data/load-samples.html new file mode 100644 index 0000000..2a4f013 --- /dev/null +++ b/inst/web/templates/content/data/enter-data/load-samples.html @@ -0,0 +1,19 @@ +

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/web/templates/content/data/enter-data/manual-entry.html b/inst/web/templates/content/data/enter-data/manual-entry.html new file mode 100644 index 0000000..a6319d9 --- /dev/null +++ b/inst/web/templates/content/data/enter-data/manual-entry.html @@ -0,0 +1,11 @@ + +
+ + +
+ +
+ +
diff --git a/inst/web/templates/content/data/enter-data/required-format.html b/inst/web/templates/content/data/enter-data/required-format.html new file mode 100644 index 0000000..724dd83 --- /dev/null +++ b/inst/web/templates/content/data/enter-data/required-format.html @@ -0,0 +1,25 @@ + + + +
+
+

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

Data plots

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

Data table

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