gwl_area_plot: Creates an area plot of groundwater levels with trend line

View source: R/gwlAreaPlot.R

gwl_area_plotR Documentation

Creates an area plot of groundwater levels with trend line

Description

An area plot (hydrograph) of groundwater levels, with trend line of a given slope and intercept, optionally with interpolated values shown.

Usage

gwl_area_plot(dataframe, trend, intercept, trend_category, sig,
  showInterpolated = FALSE, show_stable_line = FALSE, save = FALSE,
  path = "./", mkperiod = "annual", opts = NULL)

Arguments

dataframe

A dataframe with well level monthly time series and the following columns: Date, med_GWL, nReadings

trend

(Numeric) Trend in m/month

intercept

(Numeric) Intercept in m

trend_category

Trend category: "stable", or another description of the magnitude and direction of the trend. This description will be displayed on the graph in Title Case. If "stable", no trend value or statistical significance will be displayed on the plot, otherwise trend value will be displayed alongside the category information.

sig

(Numeric) Significance of trend test

showInterpolated

(Logical) Show the points where missing values in the time series were interpolated

show_stable_line

(Logical) Show the Mann-Kendall trend line when category is "stable"

save

Save the graph to file?

path

Where to save the graph if save = TRUE

mkperiod

The period ("monthly" or "annual") the Mann-Kendall test was performed on

opts

Other options to pass to ggplot2

Value

A ggplot2 object.


bcgov/bcgroundwater documentation built on March 18, 2024, 5:43 a.m.