sc_cl: Specific conductance and chloride

Sc_Cl_plotR Documentation

Specific conductance and chloride

Description

Functions to create the individual chloride, specific conductance, and combination plots and tables for a single site.

Usage

Sc_Cl_plot(qw_data, plot_title, subtitle = "U.S. Geological Survey")

Sc_Cl_table(qw_data)

qw_plot(
  qw_data,
  plot_title,
  y_label = NA,
  CharacteristicName = "Chloride",
  start_date = NA,
  end_date = NA,
  subtitle = "U.S. Geological Survey"
)

qw_summary(qw_data, CharacteristicName, norm_range = NA)

Arguments

qw_data

data frame returned from dataRetrieval::readWQPqw, must include columns sample_dt, parm_cd, result_va

plot_title

character title for plot

subtitle

character. Sub-title for plot, default is "U.S. Geological Survey".

y_label

character label for y axis. If left as NA, the function will attempt to use the "variableInfo" attribute of qw_data. This is attached to dataRetrieval output.

CharacteristicName

character CharacteristicName to filter to.

start_date

Date to start plot. If NA (which is the default), the plot will start at the earliest measurement.

end_date

Date to end plot. If NA (which is the default), the plot will end with the latest measurement.

norm_range

a numerical range to potentially group the data. If NA, no grouping is shown.

Examples


# site <- "263819081585801"
# parameterCd <- c("00095","90095","00940","99220")
# site_data <- dataRetrieval::readWQPqw(site, 
#                                        parameterCd)
# Using package example data:
qw_data <- L2701_example_data$QW
plot_title <- paste(attr(qw_data, "siteInfo")[["station_nm"]], ": Specific Conductance vs Chloride")
Sc_Cl_plot(qw_data, plot_title)

sc_cl <- Sc_Cl_table(qw_data)
plot_title <- attr(qw_data, "siteInfo")[["station_nm"]]
qw_plot(qw_data, plot_title, CharacteristicName = "Chloride")
qw_plot(qw_data, plot_title, CharacteristicName = "Specific conductance")
qw_plot(qw_data,
        plot_title, 
        CharacteristicName = "Specific conductance",
        start_date = "1990-01-01")
       
site <- "USGS-01491000"
qw_data_phos <- dataRetrieval::readWQPqw(site, "Orthophosphate")
qw_plot(qw_data_phos ,
        CharacteristicName = "Orthophosphate",
        plot_title = "Choptank: Orthophosphate")

qw_summary(qw_data, CharacteristicName = "Chloride",
 norm_range = c(230, 860))
qw_summary(qw_data, CharacteristicName = "Specific conductance",
 norm_range = NA)

USGS-R/HASP documentation built on July 28, 2024, 7:53 a.m.