View source: R/heatcalendar_plot.R
heatcalendar_plot | R Documentation |
The 'heatcalendar_plot()' function creates a heatmap-style calendar visualization that represents the density of events over time. Each cell in the heatmap represents a specific day, and its color intensity reflects the number of events that occurred on that day. This function utilizes the 'ggplot2' R package to create the heatmap calendar plot.
heatcalendar_plot(
.data,
timevar = NULL,
week_start = getOption("lubridate.week.start", 1)
)
.data |
A dataframe that contains the time variable |
timevar |
The time variable name |
week_start |
When set to 1 (by default), the week starts on Monday, when set to 7, the week starts on Sunday following USA calendar. |
The 'heatcalendar_plot()' function generates a heatmap-style calendar plot where each cell corresponds to a day of the year. The color intensity of each cell represents the event density, allowing for the identification of patterns and trends in event occurrences over time.
A heatmap calendar plot
if (interactive()) {
esmdata_sim$sent <- as.POSIXct(as.character(esmdata_sim$sent))
heatcalendar_plot(esmdata_sim, timevar = "sent")
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.