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;" ) ), 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 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. 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