Pair Results for Numeric Criteria Calculation (UNDER ACTIVE DEVELOPMENT)
Source:R/CriteriaComparison.R
TADA_PairForCriteriaCalc.Rd
This function pairs TADA results with results from specified characteristics from the same MonitoringLocation within a user-specified time window to facilitate the calculation of numeric criteria. The columns created by TADA_AutoClean are required to run this function. If they are not present in the data frame, the function will stop and print an error message.
Value
A TADA data frame with six additional columns added for each pairing group specified in the pairing ref.
Details
Users can provide a pairing reference file (can be created using TADA_CreatePairRef) to specify which combinations of TADA.CharacteristicName, TADA.ResultMeasure.MeasureUnit, TADA.MethodSpeciationName, and TADA.ResultSampleFractionText should be used for hardness, pH, temperature, salinity, chloride or other user-defined groups. If no ref is specified, all possible combinations for hardness, pH, temperature, salinity and chloride will be used.
Examples
AL_df <- TADA_DataRetrieval(
startDate = "2010-11-30",
endDate = "2010-12-01",
statecode = "AL"
)
#> [1] "Downloading WQP query results. This may take some time depending upon the query size."
#> $statecode
#> [1] "US:01"
#>
#> $startDate
#> [1] "2010-11-30"
#>
#> $endDate
#> [1] "2010-12-01"
#>
#> NEWS: USGS data availability and format are changing.
#> Beginning in March 2024 the data obtained from legacy WQP profiles
#> do not include new USGS data or recent updates to existing data.
#> To view the status of changes in data availability and code functionality, visit:
#> https://doi-usgs.github.io/dataRetrieval/articles/Status.html
#> If you have additional questions about these changes,
#> email CompTools@usgs.gov.
#> NEWS: USGS data availability and format are changing.
#> Beginning in March 2024 the data obtained from legacy WQP profiles
#> do not include new USGS data or recent updates to existing data.
#> To view the status of changes in data availability and code functionality, visit:
#> https://doi-usgs.github.io/dataRetrieval/articles/Status.html
#> If you have additional questions about these changes,
#> email CompTools@usgs.gov.
#> [1] "Data successfully downloaded. Running TADA_AutoClean function."
#> [1] "TADA_Autoclean: creating TADA-specific columns."
#> [1] "TADA_Autoclean: harmonizing dissolved oxygen characterisic name to DISSOLVED OXYGEN SATURATION if unit is % or % SATURATN."
#> [1] "TADA_Autoclean: handling special characters and coverting TADA.ResultMeasureValue and TADA.DetectionQuantitationLimitMeasure.MeasureValue value fields to numeric."
#> [1] "TADA_Autoclean: converting TADA.LatitudeMeasure and TADA.LongitudeMeasure fields to numeric."
#> [1] "TADA_Autoclean: harmonizing synonymous unit names (m and meters) to m."
#> [1] "TADA_Autoclean: updating deprecated (i.e. retired) characteristic names."
#> [1] "20 results in your dataset have one of the following deprecated characteristic names: Inorganic nitrogen (nitrate and nitrite); Inorganic nitrogen (nitrate and nitrite) ***retired***use Nitrate + Nitrite. These names have been substituted with the updated preferred names in the TADA.CharacteristicName field."
#> [1] "TADA_Autoclean: harmonizing result and depth units."
#> [1] "TADA_Autoclean: creating TADA.ComparableDataIdentifier field for use when generating visualizations and analyses."
#> [1] "NOTE: This version of the TADA package is designed to work with numeric data with media name: 'WATER'. TADA_AutoClean does not currently remove (filter) data with non-water media types. If desired, the user must make this specification on their own outside of package functions. Example: dplyr::filter(.data, TADA.ActivityMediaName == 'WATER')"
AL_PairRef <- TADA_PairForCriteriaCalc(AL_df)