This function loops through a data frame, looking for heatevents (specified by the limit t) and extracting the previous and following days, denoted by the arguments days_before and days_after.
This function relies on the lubridate package for date delination, rather than row numbers. This requires a date column - date_col - which needs to be class(date).
The intention of this function is to visualise the building of temperatures and the cooling down of temperatures surrounding the peak day or "heatevent".
1 |
1 2 3 4 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.