Learn R Programming

SWMPr (version 2.0.0)

plot_summary: Plot graphical summaries of SWMP data

Description

Plot graphical summaries of SWMP data for individual parameters, including seasonal/annual trends and anomalies

Usage

plot_summary(swmpr_in, ...)

## S3 method for class 'swmpr':
plot_summary(swmpr_in, param, years = NULL, ...)

Arguments

swmpr_in
input swmpr object
...
additional arguments passed to other methods, currently not used
param
chr string of variable to plot
years
numeric vector of starting and ending years to plot, default all

Value

  • A graphics object (Grob) of multiple ggplot objects.

Details

This function creates several graphics showing seasonal and annual trends for a given swmp parameter. Plots include monthly distributions, monthly anomalies, and annual anomalies in multiple formats. Anomalies are defined as the difference between the monthly or annual average from the grand mean. Monthly anomalies are in relation to the grand mean for the same month across all years. All data are aggregated for quicker plotting. Nutrient data are based on monthly averages, wheras weather and water quality data are based on daily averages. Cumulative precipitation data are based on the daily maximum. An interactive Shiny widget is available: https://beckmw.shinyapps.io/swmp_summary/

See Also

ggplot

Examples

Run this code
## import data
data(apacpnut)
dat <- qaqc(apacpnut)

## plot
plot_summary(dat, param = 'chla_n', years = c(2007, 2013))

Run the code above in your browser using DataLab