Skip to content

Commit

Permalink
Merge pull request #143 from USEPA/cm-userfeedback
Browse files Browse the repository at this point in the history
Usability updates
  • Loading branch information
cristinamullin authored Mar 14, 2024
2 parents 0c04119 + 74b48ec commit c18b23a
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 71 deletions.
10 changes: 4 additions & 6 deletions R/mod_query_data.R
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ mod_query_data_ui <- function(id) {
tags$i(
class = "glyphicon glyphicon-info-sign",
style = "color:#0072B2;",
title = "At present, TADA is only designed to work with water sample media"
title = "TADA is designed to work with water data"
)
),
choices = c("", media),
Expand Down Expand Up @@ -397,8 +397,8 @@ mod_query_data_server <- function(id, tadat) {
tadat$endDate <- as.character(input$endDate)
}
if (length(input$startDate) == 0) {
# ensure if date is empty, the query receives a proper start date. Might want a warning message instead.
tadat$startDate <- "1800-01-01"
# ensure if date is empty, the query receives a proper input ("null")
tadat$startDate <- "null"
} else {
tadat$startDate <- as.character(input$startDate)
}
Expand Down Expand Up @@ -436,7 +436,7 @@ mod_query_data_server <- function(id, tadat) {
shiny::showModal(
shiny::modalDialog(
title = "Empty Query",
"Your query returned zero results. Please adjust your search inputs and try again."
"Your query returned zero results. Please adjust your search inputs and try again. Remember to update the start and end dates."
)
)
} else {
Expand Down Expand Up @@ -501,8 +501,6 @@ initializeTable <- function(tadat, raw) {
}

removals <- data.frame(matrix(nrow = nrow(raw), ncol = 0))
# removals["Media Type"] = ifelse(!raw$TADA.ActivityMediaName%in%c("WATER"),TRUE,raw$Removed)
# removals["Special Characters"] = ifelse(raw$TADA.ResultMeasureValueDataTypes.Flag%in%c("ND or NA","Text","Coerced to NA"),TRUE,raw$Removed)
tadat$raw <- raw
tadat$removals <- removals
}
Expand Down
34 changes: 17 additions & 17 deletions inst/flag_prompts.csv
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
Order,Level,Prompt,flagType
1,Required,Sample media is not water,Sample media is not water
2,Required,Result value is not numeric or result value is NA and no detection limit value is provided,Result value is not numeric or result value is NA and no detection limit value is provided
3,Required,Conflict between detection condition text and detection limit type or detection limit type is not in WQX domain tables (likely USGS/NWIS-specific) ,Conflict between detection condition text and detection limit type or detection limit type is not in WQX domain tables (likely USGS/NWIS-specific)
4,Recommended,Invalid speciation for associated characteristic,Invalid speciation for associated characteristic
5,Recommended,Invalid characteristic and fraction combination,Invalid characteristic and fraction combination
6,Recommended,Invalid units for a given characteristic and media combination,Invalid units for a given characteristic and media combination
7,Recommended,"Measurement activity type code indicates it is a QC replicate, duplicate, or blank","Measurement activity type code indicates it is a QC replicate, duplicate, or blank"
8,Recommended,MeasureQualifierCode indicates result value is suspect,MeasureQualifierCode indicates result value is suspect
9,Optional,Metadata indicates duplicative uploads of the same results within a single organization,Metadata indicates duplicative uploads of the same results within a single organization
10,Optional,Metadata indicates duplicative uploads of the same results by multiple organizations,Metadata indicates duplicative uploads of the same results by multiple organizations
11,Optional,Uncommon analytical methods,Uncommon analytical methods
12,Optional,"QAPP approval column is ""N"" (indicating not approved) or NA","QAPP approval column is ""N"" (indicating not approved) or NA"
13,Optional,Quality Assurance Project Plan URL is missing,Quality Assurance Project Plan URL is missing
14,Optional,"Metadata indicates result(s) are aggregate, high-frequency continuous sensor results, not discrete samples","Metadata indicates result(s) are aggregate, high-frequency continuous sensor results, not discrete samples"
15,Optional,"Result value(s) above the national threshold for a given characteristic, possibly indicating non-sensical value(s)","Result value(s) above the national upper threshold for a given characteristic, possibly indicating non-sensical value(s)"
16,Optional,"Result value(s) below the national threshold for a given characteristic, possibly indicating non-sensical value(s)","Result value(s) below the national lower threshold for a given characteristic, possibly indicating non-sensical value(s)"
17,Optional,Coordinates are outside of the United States and/or imprecise (less than three decimal digits),Coordinates are outside of the United States and/or imprecise (less than three decimal digits)
1,Required,Result value is not numeric or NA and no detection limit value is provided (see TADA.ResultMeasureValueDataTypes.Flag),Result value is not numeric or NA and no detection limit value is provided
2,Required,Result value is not numeric or NA and the detection limit value cannot be interpreted because there is a conflict between the detection condition text and detection limit type provided by the data submitter [or the detection limit type is not in WQX domain tables (USGS/NWIS-specific)] (see TADA.CensoredData.Flag),Result value is not numeric or NA and the detection limit value cannot be interpreted because there is a conflict between the detection condition text and detection limit type provided by the data submitter [or the detection limit type is not in WQX domain tables (USGS/NWIS-specific)]
3,Recommended,Suspect characteristic and speciation combination (see TADA.MethodSpeciation.Flag),Suspect characteristic and speciation combination
4,Recommended,Suspect characteristic and fraction combination (see TADA.SampleFraction.Flag),Suspect characteristic and fraction combination
5,Recommended,Suspect characteristic and unit combination (see TADA.ResultUnit.Flag),Suspect characteristic and unit combination
6,Recommended,"ActivityTypeCode indicates result value is a QC replicate, duplicate, or blank (see TADA.ActivityType.Flag)","ActivityTypeCode indicates result value is a QC replicate, duplicate, or blank"
7,Recommended,MeasureQualifierCode indicates result value is suspect (see TADA.MeasureQualifierCode.Flag),MeasureQualifierCode indicates result value is suspect
8,Optional,Metadata indicates duplicative uploads of the same results within a single organization (see TADA.SingleOrgDup.Flag),Metadata indicates duplicative uploads of the same results within a single organization
9,Optional,Metadata indicates duplicative uploads of the same results by multiple organizations (see TADA.ResultSelectedMultipleOrgs),Metadata indicates duplicative uploads of the same results by multiple organizations
10,Optional,Uncommon or suspect characteristic and analytical method combination (see TADA.AnalyticalMethod.Flag),Uncommon or suspect characteristic and analytical method combination
11,Optional,"Quality Assurance Project Plan (QAPPApprovedIndicator) indicates ""N"" (not approved) or NA","Quality Assurance Project Plan (QAPPApprovedIndicator) indicates ""N"" (not approved) or NA"
12,Optional,Quality Assurance Project Plan (QAPP) document is not available via the ProjectFileUrl (see TADA.QAPPDocAvailable),Quality Assurance Project Plan (QAPP) document is not available via the ProjectFileUrl
13,Optional,"Metadata indicates result(s) are aggregate, high-frequency continuous sensor results, not discrete samples (see TADA.AggregatedContinuousData.Flag)","Metadata indicates result(s) are aggregate, high-frequency continuous sensor results, not discrete samples"
14,Optional,"Result value(s) above the national threshold for a given characteristic, possibly indicating non-sensical value(s) (see TADA.ResultValueAboveUpperThreshold.Flag)","Result value(s) above the national upper threshold for a given characteristic, possibly indicating non-sensical value(s)"
15,Optional,"Result value(s) below the national threshold for a given characteristic, possibly indicating non-sensical value(s) (see TADA.ResultValueBelowLowerThreshold.Flag)","Result value(s) below the national lower threshold for a given characteristic, possibly indicating non-sensical value(s)"
16,Optional,Coordinates are outside of the United States (see TADA.InvalidCoordinates.Flag),Coordinates are outside of the United States
17,Optional,Coordinates are imprecise (less than three decimal digits) (see TADA.InvalidCoordinates.Flag),Coordinates are imprecise (less than three decimal digits)
Loading

0 comments on commit c18b23a

Please sign in to comment.