dailyBarplotBase: Create a daily bar plot for a single monitor

Description Usage Arguments Value Examples

View source: R/dailyBarplotBase.R

Description

Create a bar plot showing daily average PM2.5 data over a period for the given monitor. Colored bars represent the PM2.5 readings for each day.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
dailyBarplotBase(
  ws_monitor,
  startdate = NULL,
  enddate = NULL,
  colorPalette = aqiPalette("aqi"),
  ylimStyle = "auto",
  borderColor = "black",
  borderSize = 1,
  currentNowcast = NULL,
  currentPrediction = NULL,
  showAQIStackedBars = FALSE,
  showAQILines = FALSE,
  showAQILegend = FALSE,
  dateFormat = "%b %d",
  title = ""
)

Arguments

ws_monitor

ws_monitor object containing a single monitor.

startdate

Desired start date (integer or character in Ymd format or POSIXct).

enddate

Desired end date (integer or character in Ymd format or POSIXct).

colorPalette

Palette function to convert monitor values into colors.

ylimStyle

Style of y-axis limits. One of auto|pwfsl.

borderColor

Border color for individual bars.

borderSize

Border size for individual bars.

currentNowcast

Real-time current Nowcast value – for use in plots presented in the PWFSL monitoring site.

currentPrediction

Real-time current prediction for today's daily average – for use in plots presented in the PWFSL monitoring site.

showAQIStackedBars

Logical specifying whether to show stacked AQI color bars on the left.

showAQILines

Logical specifying whether to show AQI color lines.

showAQILegend

Logical specifying whether to show an AQI legend.

dateFormat

Format for x-axis dates. Used for date_labels argument to scale_x_datetime.

title

Optional title.

Value

A 'ggplot' plot object with a daily bar plot for a single monitor.

Examples

1
2
3
4
ws_monitor <- PWFSLSmoke::Carmel_Valley
startdate <- "2016-08-05"
enddate <- "2016-08-19"
dailyBarplotBase(ws_monitor, startdate, enddate)

MazamaScience/PWFSLSmokePlots documentation built on Feb. 10, 2020, 9:58 p.m.