From 24fda7cc202abbba63b8aace9622633b7645bbff Mon Sep 17 00:00:00 2001 From: gaelso Date: Wed, 24 Jul 2024 00:48:52 +0200 Subject: [PATCH] Added readme and info in first tab --- R/mod1_server.R | 1 + R/mod_info_UI.R | 17 +++++++++++++++-- R/mod_info_server.R | 12 ++++++++++++ R/shiny_run_speval.R | 4 ++-- README.md | 29 +++++++++++++++++++++++++++++ 5 files changed, 59 insertions(+), 4 deletions(-) create mode 100644 R/mod_info_server.R create mode 100644 README.md diff --git a/R/mod1_server.R b/R/mod1_server.R index e69de29..8b13789 100644 --- a/R/mod1_server.R +++ b/R/mod1_server.R @@ -0,0 +1 @@ + diff --git a/R/mod_info_UI.R b/R/mod_info_UI.R index bf67c21..43ecc29 100644 --- a/R/mod_info_UI.R +++ b/R/mod_info_UI.R @@ -15,6 +15,19 @@ mod_info_UI <- function(id){ card_left <- card( h1("Welcome"), + h4("Objective"), + + p( + "This app aims to help field inventory teams and other plants observers and + enthusiasts to validate and keep your species list updated. The script validates + a list of species names given in a CSV file." + ), + + p( + "you are using the package ", tags$code("speval"), "version: ", + textOutput(outputId = ns("speval_version"), inline = TRUE), "." + ), + h4("What is ", tags$code("arena-helpers")), p( "This app is part of of a collection of tools designed to support Forest inventory related @@ -39,11 +52,11 @@ mod_info_UI <- function(id){ ## Emission factors ---------------------------------------------------------- card_right_sub1 <- card( - p("Placeholder for content"), + p("Placeholder for content sub1"), ) card_right_sub2 <- card( - p("placeholder for content") + p("placeholder for content sub2") ) card_right_top <- card( diff --git a/R/mod_info_server.R b/R/mod_info_server.R new file mode 100644 index 0000000..a077bd9 --- /dev/null +++ b/R/mod_info_server.R @@ -0,0 +1,12 @@ +mod_info_server <- function(id, rv) { + + moduleServer(id, function(input, output, session) { + + ns <- session$ns + + ## OUTPUTS ################################################################# + output$speval_version <- renderText({ as.character(packageVersion("speval")) }) + + }) ## END module server function + +} diff --git a/R/shiny_run_speval.R b/R/shiny_run_speval.R index 596eac4..3401e92 100644 --- a/R/shiny_run_speval.R +++ b/R/shiny_run_speval.R @@ -98,7 +98,7 @@ shiny_run_speval <- function(...) { title = i18n$t("Info"), #OR title = "I am module 1" value = "mod1", icon = icon("info"), - mod_info_UI("tab_info_UI") ## See R/mod1_UI.R + mod_info_UI("tab_info") ## See R/mod1_UI.R ), nav_panel( @@ -139,7 +139,7 @@ shiny_run_speval <- function(...) { r_lang <- reactive({ input$language }) ## + Module server functions ============================================ - # mod_home_server("tab_home", rv = rv) + mod_info_server("tab_info", rv = rv) # # mod_CV_server("tab_cv", rv = rv) # diff --git a/README.md b/README.md new file mode 100644 index 0000000..76c6601 --- /dev/null +++ b/README.md @@ -0,0 +1,29 @@ +# speval: Plant Species Name Validation Tool + +This app aims to help field inventory teams and other plants observers and +enthusiasts to validate and keep your species list updated. + +The app takes a CSV file as input, checks for common species lists harmonization issues then compare plant species names against renowned taxonomic backbones. + +The outputs are: (1) a comparison of the different backbones for each name submitted and (2) a series of statistics to help users correct outdated names and typos but also decide what to do in case of conflict between different backbones. + + +## How to install + +This apps is intended to run locally as the validation process can take from a few seconds to a few hours for long lists (national level surveys in tropical countries for example). + +It requires R and Rstudio installation (see: https://posit.co/download/rstudio-desktop/) + +Windows users may need to also install Rtools after R and Rstudio: https://cran.r-project.org/bin/windows/Rtools/rtools44/rtools.html + +Once R and Rstudio are install, from the R console run: + +## Installation + + remotes::install_github("openforis/speval") + +## Launch the shiny app + + speval::shiny_run_speval() + +