diff --git a/R/Utilities.R b/R/Utilities.R index cb30c630..3952236c 100644 --- a/R/Utilities.R +++ b/R/Utilities.R @@ -89,7 +89,9 @@ TADA_AutoClean <- function(.data) { required_cols <- c( "ActivityMediaName", "ResultMeasureValue", "ResultMeasure.MeasureUnitCode", "CharacteristicName", "ResultSampleFractionText", "MethodSpecificationName", - "DetectionQuantitationLimitMeasure.MeasureUnitCode", "ResultDetectionConditionText" + "DetectionQuantitationLimitMeasure.MeasureUnitCode", "ResultDetectionConditionText", + "ResultIdentifier", "DetectionQuantitationLimitMeasure.MeasureValue", + "LatitudeMeasure", "LongitudeMeasure" ) # check .data has required columns @@ -528,6 +530,7 @@ TADA_OrderCols <- function(.data) { "TADA.ResultMeasureValueDataTypes.Flag", "TADA.ResultValueAggregation.Flag", + "TADA.MeasureQualifierCode.Flag", "TADA.CensoredData.Flag", "TADA.CensoredMethod", @@ -1136,7 +1139,6 @@ TADA_CheckRequiredFields <- function(.data) { #"ActivityLocation.LongitudeMeasure", #"ResultStatusIdentifier", #"ResultWeightBasisText", - #"ResultTimeBasisText", #"ResultTemperatureBasisText", #"ResultParticleSizeBasisText", #"USGSPCode", @@ -1163,12 +1165,6 @@ TADA_CheckRequiredFields <- function(.data) { #"AquiferName", #"LocalAqfrName", #"FormationTypeText", - #"AquiferTypeName", - #"ConstructionDateText", - #"WellDepthMeasure.MeasureValue", - #"WellDepthMeasure.MeasureUnitCode", - #"WellHoleDepthMeasure.MeasureValue", - #"WellHoleDepthMeasure.MeasureUnitCode", #"ProjectMonitoringLocationWeightingUrl", #"DrainageAreaMeasure.MeasureValue", #"DrainageAreaMeasure.MeasureUnitCode", @@ -1193,9 +1189,7 @@ TADA_CheckRequiredFields <- function(.data) { "SampleCollectionMethod.MethodIdentifierContext", "SampleCollectionMethod.MethodName", "SampleCollectionMethod.MethodDescriptionText", - "SampleCollectionEquipmentName", "ActivityMediaSubdivisionName", - "StatisticalBaseCode", "DataQuality.PrecisionValue", "DataQuality.BiasValue", "DataQuality.ConfidenceIntervalValue", @@ -1209,15 +1203,29 @@ TADA_CheckRequiredFields <- function(.data) { "ResultAnalyticalMethod.MethodUrl", "ResultAnalyticalMethod.MethodDescriptionText", "ResultCommentText", - "LastUpdated", - "ProviderName", - "ResultValueTypeName", "LaboratoryName", "ResultLaboratoryCommentText", "MonitoringLocationDescriptionText", "HUCEightDigitCode", + "AquiferTypeName", # can be used to remove groundwater sites + "ConstructionDateText", # can be used to remove groundwater sites + "WellDepthMeasure.MeasureValue", # can be used to remove groundwater sites + "WellDepthMeasure.MeasureUnitCode", # can be used to remove groundwater sites + "WellHoleDepthMeasure.MeasureValue", # can be used to remove groundwater sites + "WellHoleDepthMeasure.MeasureUnitCode", # can be used to remove groundwater sites + "ProviderName", + "LastUpdated", # required + "TADA.CharacteristicName", + "TADA.ResultSampleFractionText", + "TADA.MethodSpecificationName", + "TADA.ResultMeasure.MeasureUnitCode", + "TADA.ActivityMediaName", + "TADA.DetectionQuantitationLimitMeasure.MeasureUnitCode", + "TADA.ResultMeasureValueDataTypes.Flag", + "TADA.LatitudeMeasure", + "TADA.LongitudeMeasure", "OrganizationFormalName", "ActivityTypeCode", "ActivityMediaName", @@ -1250,6 +1258,10 @@ TADA_CheckRequiredFields <- function(.data) { "QAPPApprovalAgencyName", "ProjectFileUrl", "MeasureQualifierCode", + "SampleCollectionEquipmentName", #required for continuous flag + "StatisticalBaseCode", #required for continuous flag + "ResultTimeBasisText", #required for continuous flag + "ResultValueTypeName", #required for continuous flag "ActivityIdentifier", "ProjectIdentifier", "MonitoringLocationIdentifier", diff --git a/vignettes/TADAModule1.Rmd b/vignettes/TADAModule1.Rmd index ff2e738c..7e84781e 100644 --- a/vignettes/TADAModule1.Rmd +++ b/vignettes/TADAModule1.Rmd @@ -78,7 +78,7 @@ remotes::install_github("USEPA/TADA", # when developing the package, update this chunk to the current repository, so it runs with all of the new features prior to a PR to develop remotes::install_github("USEPA/TADA", - ref = "figures", + ref = "081023-cm", dependencies = TRUE ) ```