From db217150bb75953c3c0546272fe6716f7aef6bc8 Mon Sep 17 00:00:00 2001 From: Nicole Hill Date: Tue, 4 Jun 2024 16:07:53 -0700 Subject: [PATCH 1/4] Update app title --- R/app-ui.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/app-ui.R b/R/app-ui.R index 1a11498..ca61405 100644 --- a/R/app-ui.R +++ b/R/app-ui.R @@ -21,7 +21,7 @@ app_ui <- function() { footer = NULL, header = dashboardHeader( ... = div( - h3("Ronald Lake Wood Bison Camera-Based Demographic Model"), + h3("Wood Bison Camera-Based Demographic Model"), style = "vertical-align: baseline;" ) ), From 9f73b0a00221d975c8d6873e864a87d36d9f2ba1 Mon Sep 17 00:00:00 2001 From: Nicole Hill Date: Tue, 4 Jun 2024 16:08:05 -0700 Subject: [PATCH 2/4] Add button to download example dataset --- R/mod-upload.R | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/R/mod-upload.R b/R/mod-upload.R index 65b7046..d4fd4a3 100644 --- a/R/mod-upload.R +++ b/R/mod-upload.R @@ -27,7 +27,10 @@ mod_upload_ui <- function(id, label = "upload") { downloadButton(ns("download_template"), "Template"), br(), br(), tags$label("2. Upload data"), - uiOutput(ns("upload_bison")) + uiOutput(ns("upload_bison")), + br(), br(), br(), br(), + tags$label("Download example data set"), br(), + downloadButton(ns("download_example"), "Example Data") ) fluidRow( @@ -76,6 +79,22 @@ mod_upload_server <- function(id) { } ) + # read in example data + path2 <- system.file( + package = "bisonpictools", + "example-data/data-raw.xlsx" + ) + sheets2 <- readxl::excel_sheets(path2) + example_data <- lapply(sheets2, function(x) readxl::read_excel(path2, x)) + names(example_data) <- sheets2 + + output$download_example <- downloadHandler( + filename = "wood-bison-example-data.xlsx", + content = function(file) { + writexl::write_xlsx(example_data, file) + } + ) + # upload data widget output$upload_bison <- renderUI({ rv$reset From e0f9ec5ad3e8a3a2468d4c45b43fc78b88de2c4e Mon Sep 17 00:00:00 2001 From: Nicole Hill Date: Tue, 4 Jun 2024 16:08:10 -0700 Subject: [PATCH 3/4] Add comma --- inst/helpfiles/help.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inst/helpfiles/help.md b/inst/helpfiles/help.md index f914fe9..cebade5 100644 --- a/inst/helpfiles/help.md +++ b/inst/helpfiles/help.md @@ -18,7 +18,7 @@ limitations under the License. **Workflow** -1. Download template, fill in data and upload file. +1. Download template, fill in data, and upload file. 2. Run model. 3. Explore the results. From 87ed3fc9cd66a48651d3781d36eb229bcfa39113 Mon Sep 17 00:00:00 2001 From: Nicole Hill Date: Tue, 4 Jun 2024 16:08:20 -0700 Subject: [PATCH 4/4] Add detail on how to download example data --- inst/helpfiles/upload.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/inst/helpfiles/upload.md b/inst/helpfiles/upload.md index 6831a26..94725a1 100644 --- a/inst/helpfiles/upload.md +++ b/inst/helpfiles/upload.md @@ -34,6 +34,8 @@ The uploaded data will be run through a series of checks before it will be accep - Correct the error. - Upload the corrected data. - Repeat until the file is successfully uploaded. + +If desired, download an example dataset by clicking the **Download Example Data** button, then proceed with step 2 above to explore the app's functionality. ##### Required Data Format