Skip to content

Commit

Permalink
address notes
Browse files Browse the repository at this point in the history
  • Loading branch information
cristinamullin committed Nov 21, 2023
1 parent 43416c5 commit d27ee7f
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 14,595 deletions.
2 changes: 1 addition & 1 deletion R/app_server.R
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ app_server <- function(input, output, session) {
shiny::observeEvent(tadat$new, {
shiny::showModal(shiny::modalDialog(
title = "Data Loaded",
"Your data were successfully loaded into the app and are displayed on the Overview tab. See summary information about your dataset in the gray box at the bottom of the app."
"Your data were successfully loaded into the app and are displayed on the Overview tab. The following data wrangling and cleaning steps were performed automatically when data was loaded: 1) created TADA versions of columns in dataset for editing (original columns are retained for transparency), 2) removed exact duplicates, 3) addressed special characters, 4) identified detection limit data, 5) copied detection limit value to result value if result value was blank, 6) harmonized result and depth units to TADA defaults, and 7) replaced retired characteristic names with new names. See summary information about your dataset in the gray box at the bottom of the app."
))
shiny::updateTabsetPanel(session = session, inputId = "tabbar", selected = "Overview")
tadat$new <- NULL
Expand Down
2 changes: 1 addition & 1 deletion R/mod_TADA_summary.R
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ mod_TADA_summary_server <- function(id, tadat) {
list(Data = TADA::TADA_OrderCols(tadat$raw), Parameterization = desc)
writeFile(tadat, progress_file_name)
writexl::write_xlsx(dfs, path = datafile_name)
zip(zipfile = fname,
utils::zip(zipfile = fname,
files = c(datafile_name, progress_file_name))
},
contentType = "application/zip"
Expand Down
8 changes: 4 additions & 4 deletions R/mod_data_flagging.R
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,9 @@ mod_data_flagging_server <- function(id, tadat) {
)

# Add flagging columns to raw table
#tadat$raw <- applyFlags(tadat$raw, tadat$orgs)
#write.csv(tadat$raw, "flagged.csv")
tadat$raw = utils::read.csv("flagged.csv") # THIS IS TRIPS WORKING FILE FOR TESTING, COMMENT OUT WHEN COMMITTING TO DEVELOP
# tadat$raw <- applyFlags(tadat$raw, tadat$orgs)
# write.csv(tadat$raw, "flagged.csv")
# tadat$raw = utils::read.csv("flagged.csv") # THIS IS TRIPS WORKING FILE FOR TESTING, COMMENT OUT WHEN COMMITTING TO DEVELOP

# A table (raw rows, flags) indicating whether each record passes each test
values$testResults <- flagCensus(tadat$raw)
Expand Down Expand Up @@ -193,7 +193,7 @@ mod_data_flagging_server <- function(id, tadat) {
})

shiny::observeEvent(tadat$m2f, {
updateRadioButtons(session, "m2f", selected = tadat$m2f)
shiny::updateRadioButtons(session, "m2f", selected = tadat$m2f)
})

shiny::observeEvent(input$m2f, {
Expand Down
8 changes: 7 additions & 1 deletion R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,11 @@ utils::globalVariables(c(
"Target.TADA.CharacteristicName",
"Target.TADA.MethodSpecificationName",
"write.csv", "read.csv", "downloadHandler",
"Rank", "Target.TADA.ResultSampleFractionText"
"Rank", "Target.TADA.ResultSampleFractionText",
"Field", "characteristicName", "characteristicType",
"countycode", "endDate", "example_data", "huc", "m2f",
"nd_method", "nd_mult", "od_method", "org_table",
"organization", "original_source", "proj", "sampleMedia",
"selected_filters", "selected_flags", "siteType",
"siteid", "startDate", "statecode"
))
Loading

0 comments on commit d27ee7f

Please sign in to comment.