Address Depth Profile Data
Add a new function that creates a TADA.DepthCategory.Flag with values: "No depth info", "Epilimnion-surface", "Hypolimnion-bottom", "Metalimnion/Thermocline-middle". Categories can be defined to start as: less than 2m depth = "Epilimnion", from bottom up to 2m from bottom= "Hypolimnion-bottom", and the full depth profile for "Metalimnion/Thermocline-middle".
Add a new function that handles depth data based on the TADA.DepthCategory.Flag. If results differ only by depth (all else if the same), we likely need a user input to define which value to use for that day and location (e.g., the average, max, or min value of the entire water column; or the avg, max, or min of the "Epilimnion", "Hypolimnion", or "Metalimnion/Thermocline" etc.).
Note that in special characters handling, we took the average when a depth range was provided for plotting purposes and so the result field would be numeric:
- Issue: Sometimes people put in "0-2" as a depth measurement. Previously, this was "Coerced to NA". We instead calculated an average so these values are usable, e.g. "0-2" becomes 1. However, the result value is representative of all depths between 0 and 2. There is also a element where users can specify that this is a "surface" result, and we should make sure that is filled out too in this step.
Note: There are activity and result depth fields in WQX. The activity ID will be the same if they use result depths to (usually) capture profile data.
How should we handle situations where no bottom depth measures are provided?
We may need to update TADA_RetainRequired function depending on which depth columns we'd like to retain for plotting/analysis in the Shiny app