plot_calendar: ggplot2 version of calendar plot

View source: R/plot_calendar.R

plot_calendarR Documentation

ggplot2 version of calendar plot

Description

A ggplot2 equivalent of openair::calendarPlot()

Usage

plot_calendar(data, fill, wd = NULL, ws = NULL, text = wd, draw.arrow = TRUE)

Arguments

data

Data frame containing a date column

fill

The column to fill the calendar plot. This is usually the pollutant concentration.

wd, ws

Optional wind speed and wind direction plotted as arrows.

text

Optional column to pass to text in ggplot2::aes(). This can be useful if you intend to convert to plotly and control what is showing up when you hover over the plot.

draw.arrow

Should the wind vector arrows be drawn. This is better turned off if the plot is going to be converted to plotly.

Details

Note that the ggplot2 object returned will not have any scale defined for the fill, so that they can be added easily with an ad-hoc approach.

Note

If the dates span multiple years, the year will be appended to the month name automatically, otherwise, it will not appear.

Examples

{


}

MohoWu/ricardor documentation built on March 24, 2022, 4:39 p.m.