Create A Three-Characteristic Depth Profile
Usage
TADA_DepthProfilePlot(
.data,
groups = NULL,
location = NULL,
activity_date = NULL,
depthcat = TRUE,
surfacevalue = 2,
bottomvalue = 2,
unit = "m"
)
Arguments
- .data
TADA dataframe containing the data downloaded from the WQP, where each row represents a unique data record. TADA_FlagDepthCategory has been run as dataframe must include the columns TADA.DepthCategory.Flag, TADA.ResultDepthHeightMeasure.MeasureUnitCode, TADA.ActivityDepthHeightMeasure.MeasureUnitCode, and TADA.ActivityDepthHeightMeasure.MeasureValue. Units for all depth fields must be the same. This can be accomplished using TADA_AutoClean() or TADA_ConvertDepthUnits.
- groups
A vector of two identifiers from the TADA.ComparableDataIdentifier column. For example, the groups could be 'DISSOLVED OXYGEN (DO)_NA_NA_UG/L' and 'PH_NA_NA_NA'. These groups will be specific to your dataframe. The TADA_IDDepthProfiles can be used to identify available groups.
- location
A single MonitoringLocationIdentifier to plot the depth profile. A MonitoringLocationIdentifier must be entered or an error will be returned and no depth profile will be created.
- activity_date
The date the depth profile results were collected.
- depthcat
Boolean argument indicating whether delineation between depth categories should be shown on the depth profile figure. depthcat = TRUE is the default and displays solid black lines to delineate between surface, middle, and bottom samples and labels each section of the plot.
- surfacevalue
numeric argument. The user enters how many meters from the surface should be included in the "Surface" category. Default is surfacevalue = 2.
- bottomvalue
numeric argument. The user enters how many meters from the bottom should be included in the "Bottom" category. Default is bottomvalue = 2.
- unit
Character argument. The enters either "m" or "ft" to specify which depth units should be used for the plot. Default is "m".
Value
A depth profile plot displaying up to three parameters for a single MonitoringLocationIdentifier. Displaying depth categories is optional with the depthcat argument.
Examples
# Load example dataframe:
data(Data_6Tribes_5y_Harmonized)
# Create a depth profile figure with three parameters for a single monitoring location and date
TADA_DepthProfilePlot(Data_6Tribes_5y_Harmonized,
groups = c("TEMPERATURE_NA_NA_DEG C", "PH_NA_NA_STD UNITS", "DEPTH, SECCHI DISK DEPTH_NA_NA_M"),
location = "REDLAKE_WQX-ANKE",
activity_date = "2018-10-04"
)
#> [1] "TADA_DepthProfilePlot: Running TADA_FlagDepthCategory function to add required columns to dataframe"
#> [1] "TADA_FlagDepthCategory: checking data set for depth values. 56987 results have depth values available."
#> [1] "TADA_FlagDepthCategory: assigning depth categories."
#> [1] "TADA_FlagDepthCategory: Grouping results by MonitoringLocationIdentifier, OrganizationIdentifier, CharacteristicName, and ActivityStartDate for aggregation for entire water column."
#> [1] "TADA_FlagDepthCategory: No aggregation performed."
#> [1] "TADA_DepthProfilePlot: Depth unit in data set matches depth unit specified by user for plot. No conversion necessary."
#> [1] "TADA_DepthProfilePlot: Identifying available depth profile data."
#> [1] "TADA_DepthProfilePlot: Any results for DEPTH, SECCHI DISK DEPTH, DEPTH, SECCHI DISK DEPTH (CHOICE LIST), DEPTH, SECCHI DISK DEPTH REAPPEARS, DEPTH, DATA-LOGGER (NON-PORTED), DEPTH, DATA-LOGGER (PORTED), RBP STREAM DEPTH - RIFFLE, RBP STREAM DEPTH - RUN, THALWEG DEPTH match the depth unit selected for the figure."
#> [1] "TADA_DepthProfilePlot: Adding surface delination to figure."
#> [1] "TADA_DepthProfilePlot: Adding bottom delination to figure."
# Load example dataframe:
data(Data_6Tribes_5y_Harmonized)
# Create a depth profile figure with two parameters for a single monitoring location and date without displaying depth categories
TADA_DepthProfilePlot(Data_6Tribes_5y_Harmonized,
groups = c("CONDUCTIVITY_NA_NA_US/CM", "DISSOLVED OXYGEN (DO)_NA_NA_MG/L"),
location = "REDLAKE_WQX-JOHN",
activity_date = "2018-07-31",
depthcat = FALSE
)
#> [1] "TADA_DepthProfilePlot: Running TADA_FlagDepthCategory function to add required columns to dataframe"
#> [1] "TADA_FlagDepthCategory: checking data set for depth values. 56987 results have depth values available."
#> [1] "TADA_FlagDepthCategory: assigning depth categories."
#> [1] "TADA_FlagDepthCategory: Grouping results by MonitoringLocationIdentifier, OrganizationIdentifier, CharacteristicName, and ActivityStartDate for aggregation for entire water column."
#> [1] "TADA_FlagDepthCategory: No aggregation performed."
#> [1] "TADA_DepthProfilePlot: Depth unit in data set matches depth unit specified by user for plot. No conversion necessary."
#> [1] "TADA_DepthProfilePlot: Identifying available depth profile data."