Skip to content

Commit

Permalink
2.0.7.9019
Browse files Browse the repository at this point in the history
- refactor: Edits to Shiny tabs
  • Loading branch information
leppott committed Sep 14, 2023
1 parent b654a15 commit 9666e56
Show file tree
Hide file tree
Showing 28 changed files with 153 additions and 89 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: ContDataQC
Title: Quality Control (QC) of Continous Monitoring Data
Version: 2.0.7.9018
Version: 2.0.7.9019
Authors@R: c(
person("Erik W", "Leppo", email="Erik.Leppo@tetratech.com",role=c("aut","cre")),
person("Ann","Roseberry Lincoln", role="ctb"),
Expand Down
8 changes: 7 additions & 1 deletion NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,16 @@ NEWS-ContDataQC

<!-- NEWS.md is generated from NEWS.Rmd. Please edit that file -->

#> Last Update: 2023-09-13 13:56:12.588924
#> Last Update: 2023-09-14 16:55:51.688632

# Version History

## v2.0.7.9019

2023-09-14

- refactor: Edits to Shiny tabs

## v2.0.7.9018

2023-09-13
Expand Down
8 changes: 7 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,16 @@ NEWS-ContDataQC

<!-- NEWS.md is generated from NEWS.Rmd. Please edit that file -->

#> Last Update: 2023-09-13 13:56:12.588924
#> Last Update: 2023-09-14 16:55:51.688632

# Version History

## v2.0.7.9019

2023-09-14

- refactor: Edits to Shiny tabs

## v2.0.7.9018

2023-09-13
Expand Down
5 changes: 5 additions & 0 deletions NEWS.rmd
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ cat(paste0("Last Update: ",Sys.time()))

# Version History

## v2.0.7.9019
2023-09-14

* refactor: Edits to Shiny tabs

## v2.0.7.9018
2023-09-13

Expand Down
41 changes: 20 additions & 21 deletions inst/shiny-examples/ContDataQC/external/tab_3_MainFunc.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,31 +10,12 @@ function(){

tabsetPanel(type = "tabs"

, tabPanel("About"
, tabsetPanel(type = "tabs"
, tabsetPanel(type="tabs"
,tabPanel("Run functions"
, includeHTML("www/RMD_HTML/App_3a1_About.html")
, img(src = "Fig_Rpackage_v1_20210617.png"
, height = 500, width = 800)
) # tabPanel ~ Run Functions ~ END
, tabPanel("QC Reports"
, includeHTML("www/RMD_HTML/App_3a2_QCReports.html"))
, tabPanel("Aggregate"
, includeHTML("www/RMD_HTML/App_3a3_Aggregate.html"))
, tabPanel("Summary Stats"
, includeHTML("www/RMD_HTML/App_3a4_SummaryStats.html"))

) # tabsetPanel ~ END

)## tabsetPanel
)##tabPanel ~ About

, tabPanel("Import Files"
, tabPanel("Run Functions"
, sidebarLayout(
sidebarPanel(
p("1. Upload customized QC test thresholds if desired; otherwise, the default thresholds will be used.")
, p("2. Confirm correct configuration file is being used.")
, p(textOutput("fn_input_display_config"))
, p("3. Upload input files.")
#The selected input file
#Tool tip code from https://stackoverflow.com/questions/16449252/tooltip-on-shiny-r
Expand Down Expand Up @@ -105,6 +86,24 @@ function(){

, tab_3c_QCThresh()

, tabPanel("Instructions"
, tabsetPanel(type = "tabs"
, tabsetPanel(type="tabs"
,tabPanel("Workflow"
, includeHTML("www/RMD_HTML/App_3a1_About.html")
) # tabPanel ~ Run Functions ~ END
, tabPanel("QC Reports"
, includeHTML("www/RMD_HTML/App_3a2_QCReports.html"))
, tabPanel("Aggregate"
, includeHTML("www/RMD_HTML/App_3a3_Aggregate.html"))
, tabPanel("Summary Stats"
, includeHTML("www/RMD_HTML/App_3a4_SummaryStats.html"))

) # tabsetPanel ~ END

)## tabsetPanel
)##tabPanel ~ About

# , tabPanel("Advanced?"
# )##tabPanel ~ Adv

Expand Down
24 changes: 12 additions & 12 deletions inst/shiny-examples/ContDataQC/external/tab_3c_QCThresh.R
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ function() {
, br()

#Only shows the "Default configuration" button after a user-selected file has been used
,tags$div(title = "Click to use default configuration data"
,tags$div(title = "Click to use default configuration file"
,uiOutput('ui.defaultConfig'))
)# sidebarPanel~ END
, mainPanel(
Expand Down Expand Up @@ -98,19 +98,19 @@ function() {
, p(paste("Test if data point exceeds a user defind"
, "threshold."))
, fluidRow(
column(width = 3,
column(width = sizeThreshEdit,
numericInput(inputId = "GR_Fail_Max"
, label = "Fail (Hi)"
, value = "1"))
,column(width = 3,
,column(width = sizeThreshEdit,
numericInput(inputId = "GR_Fail_Min"
, label = "Fail (Lo)"
, value = "1"))
, column(width = 3,
, column(width = sizeThreshEdit,
numericInput(inputId = "GR_Sus_Max"
, label = "Suspect (Hi)"
, value = "1"))
, column(width = 3,
, column(width = sizeThreshEdit,
numericInput(inputId = "GR_Sus_Min"
, label = "Suspect (Lo)"
, value = "1"))
Expand All @@ -120,11 +120,11 @@ function() {
, p(paste("Test if data point exceeds a user defined"
,"threshold relative to the previous data point."))
, fluidRow(
column(width = 3,
column(width = sizeThreshEdit,
numericInput(inputId = "Spike_Fail"
, label = "Fail"
, value = "1"))
,column(width = 3,
,column(width = sizeThreshEdit,
numericInput(inputId = "Spike_Sus"
, label = "Suspect"
, value = "1"))
Expand All @@ -135,11 +135,11 @@ function() {
,"standard deviations from the previous"
,"data points over a user defined time period."))
, fluidRow(
column(width = 3,
column(width = sizeThreshEdit,
numericInput(inputId = "RoC_SDs"
, label = "SDs"
, value = "1"))
,column(width = 3,
,column(width = sizeThreshEdit,
numericInput(inputId = "RoC_Hrs"
, label = "Hours"
, value = "1"))
Expand All @@ -150,15 +150,15 @@ function() {
,"threshold from previous data points over"
,"a user defined range."))
, fluidRow(
column(width = 3,
column(width = sizeThreshEdit,
numericInput(inputId = "Flat_Fail"
, label = "Fail"
, value = "1"))
,column(width = 3,
,column(width = sizeThreshEdit,
numericInput(inputId = "Flat_Sus"
, label = "Suspect"
, value = "1"))
,column(width = 3,
,column(width = sizeThreshEdit,
numericInput(inputId = "Flat_Toler"
, label = "Tolerance"
, value = "1"))
Expand Down
3 changes: 3 additions & 0 deletions inst/shiny-examples/ContDataQC/global.R
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ if (exists("ContData.env", mode = "environment") == FALSE) {
, local = TRUE)
}## exists ~ END

# Other ----
sizeThreshEdit <- 4

# Functions ----

##Extracts properties of the input spreadsheets
Expand Down
1 change: 1 addition & 0 deletions inst/shiny-examples/ContDataQC/rmd/App_1a_Overview.rmd
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ Want to try it yourself? Click [here](Custom_QC_Config_ECO66G20_test1.R) to
download test files.

![ContDataQC Shiny App workflow](RMD_Images/1.1_Fig1_About_20230828.jpg){width=95%}

# Funding

Development of the ContDataQC R tools has been funded by the United States
Expand Down
6 changes: 4 additions & 2 deletions inst/shiny-examples/ContDataQC/rmd/App_1b_TestData.rmd
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,15 @@ The test data consist of two comma-separated values (CSV) files. The files are f

* **Test**

* The two HOBO U20 test files are in the Data0_Original folder. Go to the **Automated Reformat – Onset HOBO** tab and run both files through the reformatting function. Multiple files can be run through the function at the same time (in ‘batches’). The function reformats the files so that they are ready to run through the QC report function. Next, go to the **Main Functions-Import Files** tab, import the reformatted files, run them through the ‘QC raw data’ function (multiple files can be run through the function at the same time), check the flagged data (edit if needed), aggregate the two QC’d CSV files with the ‘Aggregate QC’ed data’ function, and run the ‘Summary Statistics’ function to summarize the data. **Completed**
+ The two HOBO U20 test files are in the Data0_Original folder. Go to the **Automated Reformat – Onset HOBO** tab and run both files through the reformatting function. Multiple files can be run through the function at the same time (in ‘batches’). The function reformats the files so that they are ready to run through the QC report function. Next, go to the **Main Functions-Import Files** tab, import the reformatted files, run them through the ‘QC raw data’ function (multiple files can be run through the function at the same time), check the flagged data (edit if needed), aggregate the two QC’d CSV files with the ‘Aggregate QC’ed data’ function, and run the ‘Summary Statistics’ function to summarize the data.

* **Completed**

+ This folder has the complete set of outputs for both files so that you can see examples of the QC reports and other outputs without having to run the test data through the R tool yourself.

# miniDOT DO Sensors

The miniDOT DO test files can be downloaded [here](TestData_HOBOU20_20220822.zip).
The miniDOT DO test files can be downloaded [here](TestData_miniDOT.zip).
They are from one site and one deployment period.
You’ll see two sets of folders. Within each folder are example input and output files.

Expand Down
2 changes: 1 addition & 1 deletion inst/shiny-examples/ContDataQC/rmd/App_1c_FAQ.rmd
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ A: No, only internet access is required.

A: Yes, if you have R software installed on your computer, you can run ContDataQC as a Shiny app on your local computer and it will likely be faster.

The Shiny app is availabe as part of the ContDataQC R package. The <a href="https://github.com/leppott/ContDataQC" target="_blank">GitHub</a> includes
The Shiny app is available as part of the ContDataQC R package. The <a href="https://github.com/leppott/ContDataQC" target="_blank">GitHub</a> includes
install directions for R.

**Q: What internet browsers is this website compatible with?**
Expand Down
4 changes: 2 additions & 2 deletions inst/shiny-examples/ContDataQC/rmd/App_1f_RelatedApps.rmd
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ GitHub: https://github.com/mnsentinellakes/logger_processing

Primary contact: [tim.martin\@state.mn.us](mailto:tim.martin@state.mn.us){.email}

#### LakeMonitoR, for summarizing and visualizing QC’d continuous vertical profile data for lakes.
### LakeMonitoR, for summarizing and visualizing QC’d continuous vertical profile data for lakes.

Several of its outputs are based on the rLakeAnalyzer R package.

Expand All @@ -52,7 +52,7 @@ Primary point of contact: [Erik.Leppo\@tetratech.com](mailto:Erik.Leppo@tetratec

### Regional Monitoring Network (RMN) protocol documents for deploying continuous temperature, water level or DO sensors and time lapse cameras in streams or lakes.

Shiny app: nalms.shinyapps.io/RMN_Documents/
Shiny app: <a href="https://nalms.shinyapps.io/RMN_Documents/" target="_blank">https://nalms.shinyapps.io/RMN_Documents/</a>

Primary contact: [Jen.Stamp\@tetratech.com](mailto:Jen.Stamp@tetratech.com){.email}

Expand Down
7 changes: 3 additions & 4 deletions inst/shiny-examples/ContDataQC/rmd/App_2a2_miniDOT1.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,12 @@ function; or 2) the **PME java app** that comes with the logger.

## Additional Notes

* Want to try it yourself? Click [here](SiteX_20230828.zip) to
* Want to try it yourself? Click [here](TestData_miniDOT.zip) to
download miniDOT DO test files.

* Why are the DO saturation values all NA? This occurs when no inputs are
provided to calculate DO percent saturation. To avoid issues with the main
ContDataQC QC function any field with all NA's is when the miniDOT file is
created.
provided to calculate DO percent saturation. For more information, please see
miniDOT manual or contact the miniDOT support team.

## Examples

Expand Down
9 changes: 4 additions & 5 deletions inst/shiny-examples/ContDataQC/rmd/App_2a3_miniDOT2.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,12 @@ ready to run through the QC report function.

## Additional Notes

- Want to try it yourself? Click [here](SiteX_20230828.zip) to
- Want to try it yourself? Click [here](TestData_miniDOT.zip) to
download miniDOT DO test files.

- Why are the DO saturation values all NA? This occurs when no inputs
are provided to calculate DO percent saturation. To avoid issues
with the main ContDataQC QC function any field with all NA's is when
the miniDOT file is created.
* Why are the DO saturation values all NA? This occurs when no inputs are
provided to calculate DO percent saturation. For more information, please see
miniDOT manual or contact the miniDOT support team.

## Examples

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ if(boo_DEBUG==TRUE){

Discrete (in situ) measurements can be entered for any parameter. This needs to be done manually after the input file has been formatted (for example, after a HOBO file has been run through the Reformat function). Just add a new column into the input file and use the following naming scheme for the column heading: parameter name and units, with ‘Discrete’ at the beginning (for example, ‘Discrete Air Temp C’). The discrete data point(s) will be included in the time series plots in the Word or html QC reports that are generated when the user runs the QC function (below is an example).

Discrete measurements are important for validating your data, and in some cases, can be used to correct for sensor drift. Accuracy checks are comparisons of discrete or in situ measurements taken in the lab and/or in the field with sensor measurements from the closest date/time. The sensor measurement should be within the accuracy quoted by the manufacturer (e.g., ±0.2°C if you are using the Onset HOBO proV2 sensor). Click [configuration file](EXAMPLE_AccuracyCheckWkst.xlsx) to download an example of an accuracy check worksheet being kept by an RMN partner.
Discrete measurements are important for validating your data, and in some cases, can be used to correct for sensor drift. Accuracy checks are comparisons of discrete or in situ measurements taken in the lab and/or in the field with sensor measurements from the closest date/time. The sensor measurement should be within the accuracy quoted by the manufacturer (e.g., ±0.2°C if you are using the Onset HOBO proV2 sensor). Click [here](EXAMPLE_AccuracyCheckWkst.xlsx) to download an example of an accuracy check worksheet being kept by an RMN partner.

![Example QC plot with discrete data](RMD_Images/2.3_Discrete_Fig1_20230828.jpg)
7 changes: 4 additions & 3 deletions inst/shiny-examples/ContDataQC/rmd/App_3a1_About.rmd
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@ if(boo_DEBUG==TRUE){
}## IF ~ boo_DEBUG ~ END
```

# Main Functions

_Workflow_
# Workflow

1. **Select QC flag test thresholds.** Use the default thresholds or upload a customized configuration file. If you have one or more years of continuous data for a site, we encourage you to evaluate the performance of the QC test thresholds for each parameter at that site and customize the configuration file if needed. Click here for tips on evaluating thresholds. To learn how to edit thresholds, click here.

Expand All @@ -35,3 +33,6 @@ _Workflow_
After running each function, users must unzip/extract the files or else the files won’t be seen as an option to upload for the next step. After files are unzipped, new folders will automatically appear and the original zipped files can be deleted if desired.
Time-saver tip: some internet browsers, like Google Chrome and Mozilla Firefox, allow users to change settings so that users can select which folder to download files to (versus files going to the default Download folder). Click [here](GoogleChrome_TimesaverTips.pdf) for instructions on how to set this up in Chrome. With Mozilla Firefox, go to Settings > General > Files and Applications > Check box for “always ask where to save files.”

Some users may prefer to use the R code instead of the Shiny app.
For more information, see the ‘Advanced’ tab

6 changes: 5 additions & 1 deletion inst/shiny-examples/ContDataQC/rmd/App_3c4_QCThresh_Edit.rmd
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,16 @@ R. If you cannot install R on your computer, we recommend use Notepad or
(some people prefer Notepad++ because it has color-coding).


### Option 2, use the interactive functions shown left and below.
### Option 2, use the interactive functions.

* Select a parameter using the drop-down menu (upper left box)

* Edit thresholds using the boxes below

* After you make changes for each parameter, click ‘save changes’ as you go
(otherwise when you switch to a different parameter, it won’t save the changes
you made to the previous parameter)

* Save changes (for each parameter)

* Download custom thresholds file
Expand Down
Loading

0 comments on commit 9666e56

Please sign in to comment.