heatcalendar_plot {esmtools}R Documentation

Generate a heatmap calendar plot

Description

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.

Usage

heatcalendar_plot(
  .data,
  timevar = NULL,
  week_start = getOption("lubridate.week.start", 1)
)

Arguments

.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.

Details

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.

Value

A heatmap calendar plot

Examples

if (interactive()) {
  esmdata_sim$sent <- as.POSIXct(as.character(esmdata_sim$sent))
  heatcalendar_plot(esmdata_sim, timevar = "sent")
}

[Package esmtools version 1.0.1 Index]