knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
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.
You can install ggcalheatmap with:
remotes::install_github("denrou/ggcalheatmap")
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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.