knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)

ggcalheatmap

The goal of ggcalheatmap is to plot a calendar heatmap with a ggplot2 backend. I found recently that ggTimeSeries as the same functionnality with its function ggplot_calendar_heatmap. There should not be lot of differences between the two packages but the default parameters. Also, by default, ggcalheatmap can produce interactive calendar heatmaps.

Installation

You can install ggcalheatmap with:

remotes::install_github("denrou/ggcalheatmap")

Example

This is a basic example where we want to look at all contributions stored in all of our git repositories stored in HOME:

remotes::install_github("denrou/ggit")
# Yes this is an auto-promotion :)
df <- ggit::contributions(path = Sys.getenv("HOME"))
df
ggcalheatmap::ggcalheatmap(df[lubridate::year(df[["when"]]) >= 2017, ], "when", "n", tooltip = FALSE)

The tooltip parameter, if TRUE, creates an interactive plot that can be placed in any rmarkdown document. It uses ggiraph



denrou/ggcalheatmap documentation built on May 5, 2019, 11:06 p.m.