USEPA / EPATADA

This R package can be used to compile and evaluate Water Quality Portal (WQP) data for samples collected from surface water monitoring sites on streams and lakes. It can be used to create applications that support water quality programs and help states, tribes, and other stakeholders efficiently analyze the data.
https://usepa.github.io/EPATADA/
Creative Commons Zero v1.0 Universal
39 stars 18 forks source link

TADA.ComparableDataIdentifier column showing NA for the TADA.ResultMeasure.MeasureUnitCode portion of its string pasting #502

Closed wokenny13 closed 1 month ago

wokenny13 commented 1 month ago

Describe the bug

NA units in the TADA.ComparableDataIdentifier may be related to non-detects or TADA_SimpleCensoredMethods.

There are also some fields where the speciation seems to be showing up in the last portion of the pasting string with an NA portion prior, highlighted in orange. Unsure if this is a related issue or an expected output.

image

To Reproduce

Code to reproduce the behavior:

library(EPATADA)

# load example data
data(Data_Nutrients_UT)
# This shows the unique fields for the dataset found in TADA.ComparableDataIdentifier. NA found in the last portion of each field are found for items such as "NITRATE_DISSOLVED_NA_NA", "NITROGEN_SUSPENDED_NA_NA, "NITRATE_TOTAL_AS N_NA" and others.
unique(Data_Nutrients_UT$TADA.ComparableDataIdentifier)

Expected behavior

TADA.ResultMeasure.MeasureUnitCode should show for fields such as "NITRATE_TOTAL_AS N_MG/L" rather than "NITRATE_TOTAL_AS N_NA"

hillarymarler commented 1 month ago

Adding comments from TADA Team meeting: