-
Notifications
You must be signed in to change notification settings - Fork 23
Description
This is an example of an additional TADA maintenance need that is not yet documented... at the very least, we should add directions for how to do this to the requiredMaintenance.R
In this case, a new value was added to the WQX measure qualifier domain and the TADA team has not yet categorized it as "Suspect", "Pass", etc. By default, the code that produces WQXMeasureQualifierCodeRef.csv assigns any new domains the category, "Not Reviewed". In this case, the relevant function is TADA_GetMeasureQualifierCodeRef() and the code starts on line 720 in https://github.com/USEPA/EPATADA/blob/develop/R/WQPWQXRefTables.R. What I need to do, or what anyone maintaining the package in the future would need to do, is update the TADA_GetMeasureQualifierCodeRef() to add "HV" to the relevant list. In this case, I will add this one to the "suspect" list in the code.
More details:
This is about needing to maintain the TADA_GetMeasureQualifierCodeRef() function in WQPWQXRefTables.R which produces the WQXMeasureQualifierCodeRef.csv for use in the TADA package. That ref is used for easy filtering using the TADA_FlagMeasureQualifierCode() function.
TADA_GetMeasureQualifierCodeRef() first creates a copy of the WQX domain table (https://cdx.epa.gov/wqx/download/DomainValues/ResultMeasureQualifier.CSV). It is not just a copy though... the function then adds a column to categorize the codes for easy filtering. The problem is... new codes get added to WQX over time... so then the TADA team has to go back to edit the TADA_GetMeasureQualifierCodeRef() function and add the category.