added some changes to timons merged branch
This commit is contained in:
parent
08cf197995
commit
d2fa24fc6c
|
|
@ -3,12 +3,13 @@ params:
|
||||||
ref: "word-styles-reference-var1.docx"
|
ref: "word-styles-reference-var1.docx"
|
||||||
output_file: CI_report.docx
|
output_file: CI_report.docx
|
||||||
report_date: "2023-12-12"
|
report_date: "2023-12-12"
|
||||||
|
data_dir: "chemba"
|
||||||
output:
|
output:
|
||||||
html_document:
|
# html_document:
|
||||||
toc: yes
|
# toc: yes
|
||||||
df_print: paged
|
# df_print: paged
|
||||||
word_document:
|
word_document:
|
||||||
reference_docx: "file.path(\"word-styles-reference-var1.docx\")"
|
reference_docx: !expr file.path("word-styles-reference-var1.docx")
|
||||||
toc: yes
|
toc: yes
|
||||||
editor_options:
|
editor_options:
|
||||||
chunk_output_type: console
|
chunk_output_type: console
|
||||||
|
|
@ -18,11 +19,11 @@ editor_options:
|
||||||
#set de filename van de output
|
#set de filename van de output
|
||||||
# knitr::opts_chunk$set(echo = TRUE)
|
# knitr::opts_chunk$set(echo = TRUE)
|
||||||
# output_file <- params$output_file
|
# output_file <- params$output_file
|
||||||
# report_date <- params$report_date
|
report_date <- params$report_date
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
# # Activeer de renv omgeving
|
# # Activeer de renv omgeving
|
||||||
# renv::activate()
|
renv::activate()
|
||||||
|
|
||||||
# Optioneel: Herstel de omgeving als dat nodig is
|
# Optioneel: Herstel de omgeving als dat nodig is
|
||||||
# Je kunt dit commentaar geven als je het normaal niet wilt uitvoeren
|
# Je kunt dit commentaar geven als je het normaal niet wilt uitvoeren
|
||||||
|
|
@ -50,7 +51,7 @@ library(CAST)
|
||||||
```
|
```
|
||||||
|
|
||||||
```{r directories, message=FALSE, warning=FALSE, include=FALSE}
|
```{r directories, message=FALSE, warning=FALSE, include=FALSE}
|
||||||
project_dir <- "chemba"
|
project_dir <- params$data_dir
|
||||||
# laravel_storage_dir <- here("laravel_app/storage/app/",params$data_dir)
|
# laravel_storage_dir <- here("laravel_app/storage/app/",params$data_dir)
|
||||||
laravel_storage_dir <- here("laravel_app/storage/app",project_dir)
|
laravel_storage_dir <- here("laravel_app/storage/app",project_dir)
|
||||||
|
|
||||||
|
|
@ -71,7 +72,6 @@ source(here("r_app", "parameters_project.R"))
|
||||||
```{r week, message=FALSE, warning=FALSE, include=FALSE}
|
```{r week, message=FALSE, warning=FALSE, include=FALSE}
|
||||||
# week <- 5
|
# week <- 5
|
||||||
#today = "2023-12-12"
|
#today = "2023-12-12"
|
||||||
report_date <- Sys.Date()
|
|
||||||
today <- as.character(report_date)
|
today <- as.character(report_date)
|
||||||
week <- week(today)
|
week <- week(today)
|
||||||
|
|
||||||
|
|
@ -312,7 +312,7 @@ cum_ci_plot <- function(pivotName){
|
||||||
# names_to = "season", values_to = "Date")
|
# names_to = "season", values_to = "Date")
|
||||||
|
|
||||||
g <- ggplot(data= data_ci2 %>% filter(season %in% unique_seasons)) +
|
g <- ggplot(data= data_ci2 %>% filter(season %in% unique_seasons)) +
|
||||||
facet_wrap(~season, scales = "free_x") +
|
# facet_wrap(~Year, scales = "free_x") +
|
||||||
geom_line( aes(Date, mean_rolling10, col = Field)) +
|
geom_line( aes(Date, mean_rolling10, col = Field)) +
|
||||||
# geom_line(data= perfect_pivot, aes(Date , mean_rolling10, col = "Model CI (p5.1 Data 2022, \n date x axis is fictive)"), lty="11",size=1) +
|
# geom_line(data= perfect_pivot, aes(Date , mean_rolling10, col = "Model CI (p5.1 Data 2022, \n date x axis is fictive)"), lty="11",size=1) +
|
||||||
labs(title = paste("14 day rolling MEAN CI rate - Pivot ", pivotName))+
|
labs(title = paste("14 day rolling MEAN CI rate - Pivot ", pivotName))+
|
||||||
|
|
@ -387,7 +387,7 @@ pivots_estate <- AllPivots_merged %>% filter(pivot %in% c("1.1", "1.2", "1.3",
|
||||||
walk(pivots_estate$pivot, ~ {
|
walk(pivots_estate$pivot, ~ {
|
||||||
cat("\n") # Add an empty line for better spacing
|
cat("\n") # Add an empty line for better spacing
|
||||||
ci_plot(.x)
|
ci_plot(.x)
|
||||||
cum_ci_plot(.x)
|
# cum_ci_plot(.x)
|
||||||
})
|
})
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@ if(project_dir == "chemba"){
|
||||||
} else if (project_dir == "xinavane"){
|
} else if (project_dir == "xinavane"){
|
||||||
library(readxl)
|
library(readxl)
|
||||||
message("Yield data for Xinavane")
|
message("Yield data for Xinavane")
|
||||||
field_boundaries_sf <- st_read(here(data_dir, "Xinavane_demo.geojson")) %>% dplyr::select(-Pivot)
|
field_boundaries_sf <- st_read(here(data_dir, "pivot.geojson")) %>% dplyr::select(-Pivot)
|
||||||
names(field_boundaries_sf) <- c("Field", "subField", "geometry")
|
names(field_boundaries_sf) <- c("Field", "subField", "geometry")
|
||||||
|
|
||||||
field_boundaries <- field_boundaries_sf %>% vect()
|
field_boundaries <- field_boundaries_sf %>% vect()
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue