diff --git a/build_report.sh b/build_report.sh index a81a17a..b1ad213 100755 --- a/build_report.sh +++ b/build_report.sh @@ -48,4 +48,4 @@ elif [ "$(uname)" == "Linux" ]; then else echo "Onbekend systeem" fi -Rscript -e "rmarkdown::render('CI_report_dashboard_planet.Rmd', output_file='$filename', params=list(ref='$ref', report_date='$report_date', data_dir='$data_dir', borders='$borders'))" \ No newline at end of file +Rscript -e "rmarkdown::render('CI_report_dashboard_planet.Rmd', output_file='$filename', params=list(ref='$ref', report_date='$report_date', mail_day='$mail_day', data_dir='$data_dir', borders='$borders'))" \ No newline at end of file diff --git a/r_app/CI_report_dashboard_planet.Rmd b/r_app/CI_report_dashboard_planet.Rmd index 0eeff83..5958292 100644 --- a/r_app/CI_report_dashboard_planet.Rmd +++ b/r_app/CI_report_dashboard_planet.Rmd @@ -23,6 +23,8 @@ editor_options: # output_file <- params$output_file report_date <- params$report_date mail_day <- params$mail_day + + borders <- params$borders # # @@ -53,13 +55,6 @@ library(CAST) # source(here("r_app/report_utils.R")) source("report_utils.R") -# Define the log file path -log_file <- here("laravel_app/storage/app/rmd_log.txt") - -# Create a logging function -log_message <- function(message) { - cat(message, "\n", file = log_file, append = TRUE) -} ``` @@ -78,6 +73,14 @@ harvest_dir <- here(data_dir, "HarvestData") weekly_CI_mosaic <- here(laravel_storage_dir, "weekly_mosaic") source(here("r_app", "parameters_project.R")) + + + +log_message("Starting the R Markdown script") +log_message(paste("mail_day params:", params$mail_day)) +log_message(paste("report_date params:", params$report_date)) +log_message(paste("mail_day variable:", mail_day)) + # s2_dir <- "C:/Users/timon/Resilience BV/4002 CMD App - General/4002 CMD Team/4002 TechnicalData/04 WP2 technical/python/chemba_S2/" ``` diff --git a/r_app/Rplots.pdf b/r_app/Rplots.pdf index 5e64f58..dcaa63d 100644 Binary files a/r_app/Rplots.pdf and b/r_app/Rplots.pdf differ diff --git a/r_app/parameters_project.R b/r_app/parameters_project.R index 78d00a1..dd8ad28 100644 --- a/r_app/parameters_project.R +++ b/r_app/parameters_project.R @@ -36,3 +36,10 @@ harvesting_data <- read_excel(here(data_dir, "harvest.xlsx")) %>% age = round(as.numeric(season_end - season_start) / 7, 0) ) +# Define the log file path +log_file <- here("laravel_app/storage/app/rmd_log.txt") + +# Create a logging function +log_message <- function(message) { + cat(message, "\n", file = log_file, append = TRUE) +} \ No newline at end of file