-
Notifications
You must be signed in to change notification settings - Fork 23
Description
Is your feature request related to a problem? Please describe:
TADA_AnalysisDataFilter removes results when clean = TRUE if TADA.UseForAnalysis.Flag == "No - NA". Is this the desired behavior? See example below.
Describe the solution you'd like:
I don't think results should be removed when clean = TRUE unless they meet criteria to be flagged as sediment or groundwater... suggest that NA's (row within not enough information to assign as GW or sediment automatically) should remain and be reviewed separately.
query.params <- list(
where = "assessmentunitidentifier IN ('CT-C2_016-SB')",
outFields = "*",
f = "geojson"
)
url = "https://gispub.epa.gov/arcgis/rest/services/OW/ATTAINS_Assessment/MapServer/2/query?"
poly.response <- httr::GET(url, query = query.params)
poly.geojson <- httr::content(poly.response, as = "text", encoding = "UTF-8")
poly.sf <- sf::st_read(poly.geojson, quiet = TRUE)
WQP_raw_2 <- TADA_DataRetrieval(
# startDate = "2019-01-01",
# endDate = "2024-12-31",
aoi_sf = poly.sf,
applyautoclean = TRUE,
ask = FALSE)
WQP_flag <- TADA_AnalysisDataFilter(
WQP_raw_2,
clean = FALSE,
surface_water = TRUE,
ground_water = FALSE,
sediment = FALSE
)
# Review unique flags
unique(WQP_flag$TADA.UseForAnalysis.Flag)
# Review flagged rows
WQP_flag_review <- WQP_flag %>%
dplyr::filter(TADA.UseForAnalysis.Flag == "No - NA") %>%
dplyr::select(c("TADA.UseForAnalysis.Flag", "ActivityMediaName", "ActivityMediaSubdivisionName", "AquiferName", "LocalAqfrName", "ConstructionDateText", "WellDepthMeasure.MeasureValue", "WellDepthMeasure.MeasureUnitCode", "WellHoleDepthMeasure.MeasureValue", "WellHoleDepthMeasure.MeasureUnitCode"))
WQP_clean <- TADA_AnalysisDataFilter(
WQP_raw_2,
clean = TRUE,
surface_water = TRUE,
ground_water = FALSE,
sediment = FALSE
)Reminders for TADA contributors addressing this issue:
New features and/or edits should include all the following work:
-
Create or edit the function/code.
-
Document all code using line/inline and/or multi-line/block comments
to describe what is does. -
Create or edit tests in tests/testthat folder to help prevent and/or
troubleshoot potential future issues. -
Create or edit the function documentation. Include working
examples. -
Update or add the new functionality to the appropriate vignette
(or create new one). -
If function/code edits made as part of this issue impact other
functions in the package or functionality in the shiny app, ensure
those are updated as well. -
Run TADA_UpdateAllRefs(), TADA_UpdateExampleData(), styler::style_pkg(),
devtools::document(), and devtools::check() and address any new notes or
issues before creating a pull request. -
Run more robust check for releases: devtools::check(manual = TRUE,
remote = TRUE, incoming = TRUE)