diff --git a/Rmd/make_basicReport.R b/Rmd/make_basicReport.R index c10725c4cfc9fe742bdc06822c5a2e0bf99eff7b..12e2ef9abbfbc92c0069a9d8bf3f7d216878e6c8 100644 --- a/Rmd/make_basicReport.R +++ b/Rmd/make_basicReport.R @@ -9,7 +9,8 @@ reqLibs <- c("data.table", # data munching "here", # here "lubridate", # dates and times "ggplot2", # plots - "skimr" # for skim + "skimr", # for skim + "bookdown" # for making reports (should also install knittr etc) ) # load them woRkflow::loadLibraries(reqLibs) @@ -41,7 +42,7 @@ makeGWPlot <- function(dt){ dt[, weekDay := lubridate::wday(rDateTime, label = TRUE)] # draw a megaplot for illustrative purposes p <- ggplot2::ggplot(dt, aes(x = rDateTime, - y = GENERATION/1000000, + y = GENERATION/1000, colour = weekDay)) + geom_point() + theme(legend.position = "bottom") + @@ -51,13 +52,13 @@ makeGWPlot <- function(dt){ return(p) } version <- 10 -makeReport <- function(f,version){ +makeReport <- function(f){ # default = html rmarkdown::render(input = paste0(here::here("Rmd", f),".Rmd"), # we love here:here() - it helps us find the .Rmd to use params = list(title = title, subtitle = subtitle, authors = authors), - output_file = paste0(here::here("docs", f),version,".html") # where the output goes + output_file = paste0(here::here("docs", f),".html") # where the output goes ) }