I am trying to create a calendar heatmap but get all the days plotted for 2021. Yet, want to plot only for the days I have in the data set. From 2020 whole year and until 2021 Feb. This is done in R.
This is a fake data I have:
I am using calendarHeat from github:
source("https://raw.githubusercontent.com/iascchen/VisHealth/master/R/calendarHeat.R")
And the actual code is this:
r2g <- c("#D61818", "#FFAE63", "#FFFFBD", "#B5E384")
calendarHeat(occ_abv_18$date, occ_abv_18$oc_18, ncolors = 99, color = "r2g", varname="Occupancy over 18")
I do not understand why I do not get the heatmap? Is there a way to fix this or any other solutions are welcome? Thank you for your help.


