plot_calendar: ggplot2 version of calendar plot

Description Usage Arguments Details Note Examples

View source: R/plot_calendar.R

Description

A ggplot2 equivalent of openair::calendarPlot()

Usage

1
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

1
2
3
4
{


}

MohoWu/ricardor documentation built on March 6, 2021, 4:17 p.m.