plot_USGSdrought: USGS Drought Plot

plot_USGSdroughtR Documentation

USGS Drought Plot

Description

This function is hijacked from a blog post by Laura DeCicco at https://waterdata.usgs.gov/blog/moving-averages/. I changed it a little to include compatibility with batch_USGSdv and also the ability to change the rolling average, e.g. rolln. For more details visit the blog. Also, this function is expensive so it will take about 5 to 15 seconds to produce plot depending on period of record.

Usage

plot_USGSdrought(
  procDV,
  site = NULL,
  rolln = 30,
  startDate = "2010-01-01",
  endDate = "2015-01-01",
  smooth.span = NULL
)

Arguments

procDV

A previously created batch_USGSdv object.optional

site

A USGS NWIS site. optional

rolln

A numeric number of days in moving average

startDate

A character indicating the start date.

endDate

A character indicating the end date.

smooth.span

A numeric value indicating the smoothing parameter for the loess function. If NULL (default) no smoothing will happen.

Value

A ggplot. Works with plotly::ggplotly.


joshualerickson/wildlandhydRo documentation built on Feb. 12, 2024, 6:40 p.m.