diff --git a/r_app/.gitignore b/r_app/.gitignore index c5916ee..ec29223 100644 --- a/r_app/.gitignore +++ b/r_app/.gitignore @@ -16,5 +16,5 @@ renv .Rprofile # Ignore OSX files .DS_Store -CI_report_dashboard_planet_files +CI_report_dashboard_planet_files/ diff --git a/r_app/2_CI_data_prep.R b/r_app/2_CI_data_prep.R index dc320f4..5a57bbb 100644 --- a/r_app/2_CI_data_prep.R +++ b/r_app/2_CI_data_prep.R @@ -333,9 +333,9 @@ pivot_stats_long <- pivot_stats2 %>% # # pivot_select_model_Data_2022 <- harvesting_data %>% filter(Year == 2022) %>% pull(Field) -pivot_select_model_Data_2023 <- harvesting_data %>% filter(Year == 2023) %>% pull(Field) +pivot_select_model_Data_2023 <- harvesting_data %>% filter(Year == 2023) %>% pull(subField) -pivot_select_model_Data_2024 <- harvesting_data %>% filter(Year == 2024) %>% pull(Field) +pivot_select_model_Data_2024 <- harvesting_data %>% filter(Year == 2024) %>% pull(subField) # pivots_dates_Data_2022 <- pivots_dates0 %>% filter(!is.na(season_end_2022)) # pivot_select_model_Data_2022 <- unique(pivots_dates_Data_2022$pivot_quadrant ) @@ -348,7 +348,7 @@ pivot_select_model_Data_2024 <- harvesting_data %>% filter(Year == 2024) %>% pul extract_CI_data <- function(field_names, harvesting_data, field_CI_data, season) { # field_names = "AG1D06P" - # field_names = "1.1A" + # field_names = "1.13A" # harvesting_data = harvesting_data # field_CI_data = pivot_stats_long # season= 2023 diff --git a/r_app/CI_Report_dashboard_planet.html b/r_app/CI_Report_dashboard_planet.html index f90065a..0d6c49a 100644 --- a/r_app/CI_Report_dashboard_planet.html +++ b/r_app/CI_Report_dashboard_planet.html @@ -1624,38 +1624,90 @@ display: none;
-

Report generated on 2024-03-13

+

Report generated on 2024-03-14

-
-

Explanation of the maps

+

#Explanation of the maps

This PDF-dashboard shows the status of your fields on a weekly basis. We will show this in different ways:

    @@ -1675,49 +1727,163 @@ doing, measured through the chlorophyll index.
-

+

-

+

+

#Subgroup: Cooperative

+
+

Pivot 2.1 - 56 weeks after planting/harvest

+

-
-

Subgroup: Aguiar 1

-
-

Pivot AG1D06P - 10.580793559517 weeks after planting/harvest

-

-

+
+

Pivot 2.2 - 31 weeks after planting/harvest

+

-
-

Pivot AG1D07P - 12.32336510023 weeks after planting/harvest

-

-

+
+

Pivot 2.3 - 96 weeks after planting/harvest

+

+
+

Pivot 2.4 - 19 weeks after planting/harvest

+

-
-

Subgroup: Herois Moçambicanos

-
-

Pivot HM01 - 12.3890897140979 weeks after planting/harvest

-

-

+
+

Pivot 2.5 - 10 weeks after planting/harvest

+

-
-

Pivot HM09 - 12.7213114754098 weeks after planting/harvest

-

-

+
+

Pivot 3.1 - 55 weeks after planting/harvest

+

+
+

Pivot 3.2 - 51 weeks after planting/harvest

+

-
-

Subgroup: Macuvulane 2

-
-

Pivot MV2B07 - 12.5901639344262 weeks after planting/harvest

-

-

+
+

Pivot 3.3 - 17 weeks after planting/harvest

+

-
-

Pivot MV2B09 - 13.2459016393443 weeks after planting/harvest

-

-

+
+

Pivot 4.1 - 15 weeks after planting/harvest

+

+
+

Pivot 4.2 - 64 weeks after planting/harvest

+

+
+
+

Pivot 4.3 - 30 weeks after planting/harvest

+

+
+
+

Pivot 4.4 - 71 weeks after planting/harvest

+

+
+
+

Pivot 4.5 - 54 weeks after planting/harvest

+

+
+
+

Pivot 4.6 - 63 weeks after planting/harvest

+

+
+
+

Pivot 5.1 - 22 weeks after planting/harvest

+

+
+
+

Pivot 5.2 - 4 weeks after planting/harvest

+

+
+
+

Pivot 5.3 - 5 weeks after planting/harvest

+

+
+
+

Pivot 5.4 - 64 weeks after planting/harvest

+

+

#Subgroup: estate

+
+
+

Pivot 1.1 - 27 weeks after planting/harvest

+

+
+
+

Pivot 1.10 - 61 weeks after planting/harvest

+

+
+
+

Pivot 1.11 - 59 weeks after planting/harvest

+

+
+
+

Pivot 1.12 - 27 weeks after planting/harvest

+

+
+
+

Pivot 1.13 - NA weeks after planting/harvest

+

+
+
+

Pivot 1.14 - 60 weeks after planting/harvest

+

+
+
+

Pivot 1.16 - 71 weeks after planting/harvest

+

+
+
+

Pivot 1.17 - 79 weeks after planting/harvest

+

+
+
+

Pivot 1.18 - 59 weeks after planting/harvest

+

+
+
+

Pivot 1.2 - 23 weeks after planting/harvest

+

+
+
+

Pivot 1.3 - 24 weeks after planting/harvest

+

+
+
+

Pivot 1.4 - 21 weeks after planting/harvest

+

+
+
+

Pivot 1.6 - NA weeks after planting/harvest

+

+
+
+

Pivot 1.7 - 23 weeks after planting/harvest

+

+
+
+

Pivot 1.8 - 63 weeks after planting/harvest

+

+
+
+

Pivot 1.9 - 26 weeks after planting/harvest

+

+
+
+

Pivot 6.1 - 7 weeks after planting/harvest

+

+
+
+

Pivot 6.2 - 25 weeks after planting/harvest

+

+
+
+

Pivot DL1.1 - 81 weeks after planting/harvest

+

+
+
+

Pivot DL1.3 - NA weeks after planting/harvest

+

Yield prediction

diff --git a/r_app/CI_report_dashboard_planet.Rmd b/r_app/CI_report_dashboard_planet.Rmd index e6a4118..72abf4e 100644 --- a/r_app/CI_report_dashboard_planet.Rmd +++ b/r_app/CI_report_dashboard_planet.Rmd @@ -231,7 +231,7 @@ create_CI_diff_map <- function(pivot_raster, pivot_shape, pivot_spans, show_lege } ci_plot <- function(pivotName){ - # pivotName = "AG1D06P" + # pivotName = "1.1" pivotShape <- AllPivots_merged %>% terra::subset(Field %in% pivotName) %>% st_transform(crs(CI)) age <- AllPivots %>% dplyr::filter(Field %in% pivotName) %>% st_drop_geometry() %>% dplyr::select(Age) %>% unique() @@ -399,12 +399,16 @@ pivots_grouped <- AllPivots_merged %>% # Iterate over each subgroup for (subgroup in unique(pivots_grouped$sub_area)) { - cat("\n# Subgroup: ", subgroup, "\n") # Add a title for the subgroup + cat("\n") + cat("\n # Subgroup: ", subgroup, "\n") # Add a title for the subgroup subset_data <- filter(pivots_grouped, sub_area == subgroup) + cat("\n") walk(subset_data$Field, ~ { cat("\n") # Add an empty line for better spacing ci_plot(.x) + cat("\n") cum_ci_plot(.x) + cat("\n") }) } ```