okay
This commit is contained in:
parent
ea38c952ba
commit
3f7043199b
|
|
@ -32,7 +32,6 @@ public function __construct(Project $project,Carbon $date,int $offset)
|
|||
*/
|
||||
public function handle(): void
|
||||
{
|
||||
|
||||
$command = [
|
||||
sprintf('%supdate_RDS.sh', base_path('../')),
|
||||
sprintf('--end_date=%s', $this->date->format('Y-m-d')),
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
# nolint start: commented_code_linter, line_length_linter,object_usage_linter.
|
||||
library(here)
|
||||
library(sf)
|
||||
library(terra)
|
||||
|
|
@ -22,7 +23,7 @@ end_date <- as.Date(args[1])
|
|||
offset <- as.numeric(args[2])
|
||||
# Controleer of weeks_ago een geldig getal is
|
||||
if (is.na(offset)) {
|
||||
# stop("Het argument is geen geldig getal")
|
||||
# stop("Het argument is geen geldig getal")
|
||||
offset <- 7
|
||||
}
|
||||
|
||||
|
|
@ -54,7 +55,7 @@ daily_vrt <- here(data_dir, "vrt")
|
|||
harvest_dir <- here(data_dir, "HarvestData")
|
||||
|
||||
source("parameters_project.R")
|
||||
source("utils_2.R")
|
||||
source("ci_extraction_utils.R")
|
||||
|
||||
dir.create(here(laravel_storage_dir))
|
||||
dir.create(here(data_dir))
|
||||
|
|
@ -181,7 +182,7 @@ pivot_select_model_Data_2024 <- harvesting_data %>% filter(year == 2024)%>% filt
|
|||
# pivots_dates_Data_2024 <- pivots_dates0 %>% filter(!is.na(season_start_2024))
|
||||
# pivot_select_model_Data_2024 <- unique(pivots_dates_Data_2024$pivot_quadrant)
|
||||
|
||||
extract_CI_data <- function(field_names, harvesting_data, field_CI_data, season) {
|
||||
extract_CI_data <- function(field_names, harvesting_data, field_CI_data, season) { # nolint: line_length_linter.
|
||||
# field_names = "AG1D06P"
|
||||
# field_names = "1.13A"
|
||||
# harvesting_data = harvesting_data
|
||||
|
|
@ -214,7 +215,7 @@ extract_CI_data <- function(field_names, harvesting_data, field_CI_data, season)
|
|||
}
|
||||
|
||||
## Extracting the correct CI values
|
||||
# Data_2021 <- map(pivot_select_model_Data_2021, ~ extract_CI_data(.x, harvesting_data = harvesting_data, field_CI_data = pivot_stats_long, season = 2021)) %>% list_rbind()
|
||||
# Data_2021 <- map(pivot_select_model_Data_2021, ~ extract_CI_data(.x, harvesting_data = harvesting_data, field_CI_data = pivot_stats_long, season = 2021)) %>% list_rbind() # nolint: line_length_linter.
|
||||
# message('2021')
|
||||
# Data_2022 <- map(pivot_select_model_Data_2022, ~ extract_CI_data(.x, harvesting_data = harvesting_data, field_CI_data = pivot_stats_long, season = 2022)) %>% list_rbind()
|
||||
# message('2022')
|
||||
|
|
@ -238,4 +239,4 @@ message('show head')
|
|||
|
||||
saveRDS(CI_all, here(cumulative_CI_vals_dir,"All_pivots_Cumulative_CI_quadrant_year_v2.rds"))
|
||||
message('rds saved')
|
||||
|
||||
# nolint end
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ echo "offset: $offset"
|
|||
|
||||
# Check if required arguments are set
|
||||
if [ -z "$end_date" ] || [ -z "$project_dir" ] || [ -z "$offset" ]; then
|
||||
echo "Missing arguments. Use: build_RDS.sh --end_date=2024-01-01 --offset=7 --project_dir=chemba"
|
||||
echo "Missing arguments. Use: update_RDS.sh --end_date=2024-01-01 --offset=7 --project_dir=chemba"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue