Updated translations

This commit is contained in:
Nik Verweel 2026-02-20 10:55:35 +01:00
parent 24fd5bb8b3
commit fd0e0d0cc6
3 changed files with 166 additions and 198 deletions

2
.gitignore vendored
View file

@ -30,6 +30,8 @@ Rplots.pdf
# R Data Files
*.rds
*.here
*.png
!renv.lock
# Data Files (Excel, CSV, Text)

View file

@ -3,7 +3,7 @@ params:
ref: "word-styles-reference-var1.docx"
output_file: "CI_report.docx"
report_date: "2026-02-04" #!r Sys.Date()
data_dir: "aura"
data_dir: "tpc"
mail_day: "Wednesday"
borders: FALSE
ci_plot_type: "both"
@ -502,14 +502,11 @@ tryCatch({
t <- function(key) {
if (key %in% names(tr)) {
txt <- glue(tr[key], .envir = parent.frame())
# 1. Handle tabs
txt <- gsub(">>", " ", txt)
# 2. Handle newlines
txt <- gsub("\n", " \n", txt)
return(txt)
return(enc2utf8(as.character(txt)))
} else if (key == "" | is.na(key)) {
return("")
} else {
return(paste0("[", key, "]"))
}
@ -518,13 +515,11 @@ t <- function(key) {
<!-- Dynamic cover page -->
::: {custom-style="Cover_title" style="text-align:center; margin-top:120px;"}
<span style="font-size:100pt; line-height:1.0; font-weight:700;">Satellite Based Field Reporting</span>
<span style="font-size:100pt; line-height:1.0; font-weight:700;">`r t("cover_title")`</span>
:::
::: {custom-style="Cover_subtitle" style="text-align:center; margin-top:18px;"}
<span style="font-size:20pt; font-weight:600;">Chlorophyll Index (CI) Monitoring Report — `r toupper(params$data_dir)` Farm (Week `r { rd <- params$report_date; rd <- if (inherits(rd, "Date")) rd else suppressWarnings(as.Date(rd)); if (is.na(rd)) rd <- Sys.Date(); if (!is.null(params$week)) params$week else format(rd, '%V') }`, `r { rd <- params$report_date; rd <- if (inherits(rd, "Date")) rd else suppressWarnings(as.Date(rd)); if (is.na(rd)) rd <- Sys.Date(); format(rd, '%Y') }`)</span>
<span style="font-size:20pt; font-weight:600;">`r t("cover_subtitle")`</span>
:::
\newpage
@ -543,7 +538,7 @@ if (exists("summary_tables") && !is.null(summary_tables) && length(summary_table
# 1. Uniformity insights - group by interpretation
if (!is.null(summary_tables$uniformity) && nrow(summary_tables$uniformity) > 0) {
cat(t("field_unif"))
cat(t("field_unif"), "\n\n")
uniformity_counts <- summary_tables$uniformity %>%
dplyr::select(interpretation, count = field_count)
@ -551,14 +546,14 @@ if (exists("summary_tables") && !is.null(summary_tables) && length(summary_table
status <- uniformity_counts$interpretation[i]
count <- uniformity_counts$count[i]
if (!is.na(status) && !is.na(count) && count > 0) {
cat(t("unif_status"))
cat("-", t("unif_status"), "\n\n")
}
}
}
# 2. Area change insights - group by interpretation
if (!is.null(summary_tables$area_change) && nrow(summary_tables$area_change) > 0) {
cat("\n", t("field_area"))
cat(t("field_area"), "\n\n")
area_counts <- summary_tables$area_change %>%
dplyr::select(interpretation, count = field_count)
@ -566,14 +561,14 @@ if (exists("summary_tables") && !is.null(summary_tables) && length(summary_table
status <- area_counts$interpretation[i]
count <- area_counts$count[i]
if (!is.na(status) && !is.na(count) && count > 0) {
cat(t("area_status"))
cat("-", t("area_status"), "\n\n")
}
}
}
# 3. Growth trend insights - group by trend_interpretation
if (!is.null(summary_tables$growth_decline) && nrow(summary_tables$growth_decline) > 0) {
cat("\n", t("growth_trend"))
cat(t("growth_trend"), "\n\n")
growth_counts <- summary_tables$growth_decline %>%
dplyr::select(trend_interpretation, count = field_count)
@ -581,14 +576,14 @@ if (exists("summary_tables") && !is.null(summary_tables) && length(summary_table
trend <- growth_counts$trend_interpretation[i]
count <- growth_counts$count[i]
if (!is.na(trend) && !is.na(count) && count > 0) {
cat(t("trend_status"))
cat("-", t("trend_status"), "\n\n")
}
}
}
# 4. Patchiness insights - group by patchiness_risk
if (!is.null(summary_tables$patchiness) && nrow(summary_tables$patchiness) > 0) {
cat("\n", t("patch_risk"))
cat(t("patch_risk"), "\n\n")
patchiness_counts <- summary_tables$patchiness %>%
dplyr::select(patchiness_risk, count = field_count)
@ -596,14 +591,14 @@ if (exists("summary_tables") && !is.null(summary_tables) && length(summary_table
risk <- patchiness_counts$patchiness_risk[i]
count <- patchiness_counts$count[i]
if (!is.na(risk) && !is.na(count) && count > 0) {
cat(t("patch_status"))
cat("-", t("patch_status"), "\n\n")
}
}
}
# 5. Total fields analyzed
total_fields <- sum(summary_tables$uniformity$field_count, na.rm = TRUE)
cat("\n", t("tot_fields_analyzed"))
cat(t("tot_fields_analyzed"))
} else {
cat(t("kpi_na"))
@ -614,7 +609,7 @@ if (exists("summary_tables") && !is.null(summary_tables) && length(summary_table
`r t("section_i")`
`r t("exec_summary")`
`r t("exec_summary")`\n\n
```{r combined_kpi_table, echo=FALSE, results='asis'}
# Display KPI tables - standardized format with Level, Count, Percent columns
@ -692,8 +687,12 @@ if (exists("summary_tables") && !is.null(summary_tables) && length(summary_table
display_df <- combined_df %>%
dplyr::select(KPI = KPI_display, Level, Count, Percent)
# Translate the table for visualization
names(display_df) <- c(t("KPI"), t("Level"), t("Count"), t("Percent"))
display_df[, 1:2] <- lapply(display_df[, 1:2], function(col) sapply(col, t))
ft <- flextable(display_df) %>%
merge_v(j = "KPI") %>%
merge_v(j = t("KPI")) %>%
autofit()
cum_rows <- cumsum(kpi_group_sizes)
@ -706,12 +705,12 @@ if (exists("summary_tables") && !is.null(summary_tables) && length(summary_table
ft
} else {
cat("No valid KPI summary tables found for display.\n")
cat(t("no_kpi_table"))
}
}, error = function(e) {
safe_log(paste("Error displaying KPI tables:", e$message), "WARNING")
cat("KPI summary tables could not be displayed. Individual KPI sections will be shown below.\n")
cat(t("kpi_table_error"))
})
} else {
@ -730,7 +729,7 @@ generate_field_alerts <- function(field_details_table) {
}
# Check for required columns
required_cols <- c("Field", "Field Size (acres)", "Growth Uniformity", "Yield Forecast (t/ha)",
required_cols <- c("Field", "Field Size (hectares)", "Growth Uniformity", "Yield Forecast (t/ha)",
"Gap Score", "Decline Risk", "Patchiness Risk", "Mean CI", "CV Value", "Moran's I")
missing_cols <- setdiff(required_cols, colnames(field_details_table))
@ -887,7 +886,6 @@ if (!exists("CI_quadrant")) {
}
```
```{r load_field_boundaries, message=TRUE, warning=TRUE, include=FALSE}
# Load field boundaries from GeoJSON
tryCatch({
@ -1116,9 +1114,9 @@ tryCatch({
# Choose color palette based on colorblind_friendly parameter
if (colorblind_friendly) {
fill_scale <- ggplot2::scale_fill_viridis_c(
name = "Chlorophyll Index (CI)",
name = t("legend_ci"),
limits = c(1, 8),
direction = -1, # Reversed: green=high, yellow/red=low
direction = 1,
na.value = "transparent",
oob = scales::squish
)
@ -1126,7 +1124,7 @@ tryCatch({
# Use Red-Yellow-Green diverging palette (reversed for intuitive interpretation)
fill_scale <- ggplot2::scale_fill_distiller(
palette = "RdYlGn",
name = "Chlorophyll Index (CI)",
name = t("legend_ci"),
limits = c(1, 8),
direction = 1, # Standard direction for RdYlGn
na.value = "transparent"
@ -1190,7 +1188,7 @@ tryCatch({
panel.background = ggplot2::element_rect(fill = "white", color = NA)
) +
ggplot2::labs(
title = paste("Current Week CI Overview - Week", current_week, "of", current_iso_year)
title = t("ci_overview_title")
)
# Print the map
@ -1209,7 +1207,7 @@ tryCatch({
})
```
```{r render_farm_ci_diff_map, echo=FALSE, message=FALSE, warning=FALSE, fig.height=6.8, fig.width=8.5, dpi=150, dev='png'}
```{r render_farm_ci_diff_map, echo=FALSE, fig.height=6.8, fig.width=8.5, message=FALSE, warning=FALSE, dev='png', dpi=150}
# Create farm-level CI difference map (week-over-week change)
tryCatch({
if (!is.null(farm_ci_diff_week_ll)) {
@ -1223,7 +1221,7 @@ tryCatch({
if (colorblind_friendly) {
# Use plasma for colorblind-friendly diverging visualization
fill_scale <- ggplot2::scale_fill_viridis_c(
name = "CI Change (Week-over-Week)",
name = t("legend_ci_change"),
option = "plasma",
limits = c(-3, 3),
na.value = "transparent",
@ -1233,7 +1231,7 @@ tryCatch({
# Use Red-Blue diverging palette (red=decline, blue=increase)
fill_scale <- ggplot2::scale_fill_distiller(
palette = "RdBu",
name = "CI Change (Week-over-Week)",
name = t("legend_ci_change"),
limits = c(-3, 3),
direction = 1,
na.value = "transparent"
@ -1297,7 +1295,7 @@ tryCatch({
panel.background = ggplot2::element_rect(fill = "white", color = NA)
) +
ggplot2::labs(
title = paste("Weekly CI Change - Week", current_week, "vs Week", week_minus_1)
title = t("ci_change_title")
)
# Print the map
@ -1316,18 +1314,9 @@ tryCatch({
})
```
# Section 2: Field-by-Field Analysis
\newpage
## Overview of Field-Level Insights
This section provides detailed, field-specific analyses including chlorophyll index maps, trend graphs, and performance metrics. Each field is analyzed individually to support targeted interventions.
**Key Elements per Field:**
- Current and historical CI maps
- Week-over-week change visualizations
- Cumulative growth trends
- Field-specific KPI summaries
*Navigate to the following pages for individual field reports.*
`r t("section_ii")`
\newpage
@ -1516,7 +1505,7 @@ tryCatch({
})
```
```{r generate_subarea_visualizations, echo=FALSE, fig.height=3.8, fig.width=6.5, dpi=150, message=FALSE, warning=FALSE, results='asis', eval=FALSE}
```{r generate_subarea_visualizations, eval=FALSE, echo=FALSE, fig.height=3.8, fig.width=6.5, message=FALSE, warning=FALSE, dpi=150, results='asis'}
# Alternative visualization grouped by sub-area (disabled by default)
tryCatch({
# Group pivots by sub-area
@ -1549,17 +1538,14 @@ tryCatch({
})
```
\newpage
## Detailed Field Performance Summary by Field
The following table provides a comprehensive overview of all monitored fields with their key performance metrics from the KPI analysis.
`r t("detailed_field")`
```{r detailed_field_table, echo=FALSE, results='asis'}
# Detailed field performance table
if (!exists("field_details_table") || is.null(field_details_table) || nrow(field_details_table) == 0) {
safe_log("No field details available for table", "WARNING")
cat("No field-level KPI data available for this report period.\n")
cat(t("no_field_data"))
} else {
# Calculate field sizes from boundaries (convert to acres)
@ -1613,33 +1599,56 @@ if (!exists("field_details_table") || is.null(field_details_table) || nrow(field
field_details_clean <- field_details_clean %>%
mutate(Weekly_CI_Change = round(Weekly_CI_Change, 2)) %>%
select(
Field = Field_id,
`Field Size (acres)` = field_size_acres,
`Mean CI` = Mean_CI,
`Weekly CI Change` = Weekly_CI_Change,
`Yield Forecast (t/ha)` = TCH_Forecasted,
`Gap Score %` = Gap_Score,
`Decline Risk` = Decline_Severity,
`Patchiness Risk` = Patchiness_Risk,
`CV Value` = CV
field = Field_id,
field_size = field_size_acres,
mean_ci = Mean_CI,
weekly_ci_change = Weekly_CI_Change,
yield_forecast = TCH_Forecasted,
gap_score = Gap_Score,
decline_risk = Decline_Severity,
patchiness_risk = Patchiness_Risk,
cv_value = CV
)
} else {
field_details_clean <- field_details_clean %>%
select(
Field = Field_id,
`Field Size (acres)` = field_size_acres,
`Mean CI` = Mean_CI,
`Yield Forecast (t/ha)` = TCH_Forecasted,
`Gap Score %` = Gap_Score,
`Decline Risk` = Decline_Severity,
`Patchiness Risk` = Patchiness_Risk,
`CV Value` = CV
field = Field_id,
field_size = field_size_acres,
mean_ci = Mean_CI,
yield_forecast = TCH_Forecasted,
gap_score = Gap_Score,
decline_risk = Decline_Severity,
patchiness_risk = Patchiness_Risk,
cv_value = CV
)
}
# Translate risk levels
field_details_clean <- field_details_clean %>%
mutate(
across(
c(decline_risk, patchiness_risk),
~ sapply(.x, t)
)
)
# Translation labels for flextable
header_labels <- list(
field = t("field"),
field_size = t("field_size"),
mean_ci = t("mean_ci"),
weekly_ci_change = t("weekly_ci_change"),
yield_forecast = t("yield_forecast"),
gap_score = t("gap_score"),
decline_risk = t("decline_risk"),
patchiness_risk = t("patchiness_risk"),
cv_value = t("cv_value")
)
# Display the cleaned field table with flextable (fit to page width)
ft <- flextable(field_details_clean) %>%
set_caption("Detailed Field Performance Summary") %>%
set_header_labels(values = header_labels) %>%
set_caption(t("detailed_field_caption")) %>%
theme_booktabs() %>%
set_table_properties(width = 1, layout = "autofit") # Fit to 100% page width with auto-adjust
@ -1649,144 +1658,101 @@ if (!exists("field_details_table") || is.null(field_details_table) || nrow(field
\newpage
This automated report provides weekly analysis of sugarcane crop health using satellite-derived Chlorophyll Index (CI) measurements. The analysis supports:
`r t("section_iii")`
• Scouting of growth related issues that are in need of attention
• Timely actions can be taken such that negative impact is reduced
• Monitoring of the crop growth rates of the farm, providing evidence of performance
• Planning of harvest moment and mill logistics is supported such that optimal tonnage and sucrose levels can be harvested.
The base of the report is the Chlorophyll Index. The chlorophyll index identifies:
• Field-level crop health variations => target problem area's
• Weekly changes in crop vigor => scout for diseases and stress
• Areas requiring attention by the agricultural and irrigation teams
• Growth patterns across different field sections
Key Features: - High-resolution satellite imagery analysis - Week-over-week change detection - Individual field performance metrics - Actionable insights for crop management
### Explanation of the Report
This report provides a detailed analysis (3x3m of resolution) of your sugarcane fields based on satellite imagery. It supports you monitor crop health and development throughout the growing season. The data is processed weekly to give you timely insights for optimal farm management decisions.
### What is the Chlorophyll Index (CI)?
The Chlorophyll Index (CI) is a vegetation index that measures the relative amount of chlorophyll in plant leaves. Chlorophyll is the green pigment responsible for photosynthesis in plants. Higher CI values indicate:
• Greater photosynthetic activity
• Healthier plant tissue
• Better nitrogen uptake
• More vigorous crop growth
CI values typically range from 0 (bare soil or severely stressed vegetation) to 7+ (very healthy, dense vegetation). For sugarcane, values between 3-7 generally indicate good crop health, depending on the growth stage.
```{r include=FALSE}
# Tries to get the CI graph in different language, otherwise falls back on English
target_img <- paste0("CI_graph_example_", lang, ".png")
img_path <- ifelse(file.exists(target_img), target_img, "CI_graph_example.png")
```
<div align="center">
![`r t("ci_caption")`](CI_graph_example.png)
![`r t("ci_caption")`](`r img_path`)
</div>
### What You'll Find in This Report:
`r t("sec_iii_1")`
1. **Key Performance Indicators (KPIs):**
The report provides a farm-wide analysis based on weekly Chlorophyll Index (CI) measurements. Five comprehensive KPIs are calculated field by field to assess crop health:
- `r t("kpi_i")`
- `r t("kpi_i_metric")`
- `r t("kpi_i_calc")`
- `r t("kpi_categories")`
- `r t("kpi_i_excellent")`
- `r t("kpi_i_good")`
- `r t("kpi_i_accept")`
- `r t("kpi_i_poor")`
- `r t("kpi_i_verypoor")`
- `r t("kpi_i_why")`
- **KPI 1: Field Uniformity** — Measures how consistently crop is developing across the field
- **Metric:** Coefficient of Variation (CV) of CI pixel values
- **Calculation:** CV = (Standard Deviation of CI) / (Mean CI)
- **Categories:**
- **Excellent:** CV < 0.08 (very uniform growth, minimal intervention needed)
- **Good:** CV < 0.15 (acceptable uniformity, routine monitoring)
- **Acceptable:** CV < 0.25 (moderate variation, monitor irrigation/fertility)
- **Poor:** CV < 0.4 (high variation, investigate management issues)
- **Very poor:** CV ≥ 0.4 (severe variation, immediate field scout required)
- **Why it matters:** Uniform fields are easier to manage and typically produce better yields. Uneven growth suggests irrigation problems, fertility gaps, pests, or disease.
- `r t("kpi_ii")`
- `r t("kpi_ii_calc")`
- `r t("kpi_categories")`
- `r t("kpi_ii_rapid")`
- `r t("kpi_ii_positive")`
- `r t("kpi_ii_stable")`
- `r t("kpi_ii_declining")`
- `r t("kpi_ii_rapid_decline")`
- `r t("kpi_ii_why")`
- **KPI 2: Area Change (Weekly Growth)** — Tracks week-over-week CI changes to detect rapid improvements or declines
- **Calculation:** Current Mean CI Previous Mean CI (absolute change in CI units)
- **Categories:**
- **Rapid growth:** > +0.5 (excellent weekly progress)
- **Positive growth:** +0.2 to +0.5 (steady improvement)
- **Stable:** 0.2 to +0.2 (field maintained, no significant change)
- **Declining:** 0.5 to 0.2 (slow decline, warrant closer monitoring)
- **Rapid decline:** < 0.5 (alert: urgent issue requiring investigation)
- **Why it matters:** Week-to-week changes reveal developing problems early, enabling timely intervention.
- `r t("kpi_iii")`
- `r t("kpi_iii_applies")`
- `r t("kpi_iii_method")`
- `r t("kpi_iii_input")`
- `r t("kpi_iii_output")`
- `r t("kpi_iii_why")`
- **KPI 3: TCH Forecasted (Yield Prediction)** — Predicts final harvest tonnage for mature fields
- **Applies to:** Fields ≥ 240 days old (mature stage)
- **Method:** Random Forest machine learning model trained on historical harvest data and CI trajectories
- **Inputs:** Days after harvest (DAH) and CI growth rate (CI_per_day)
- **Output:** Predicted tons of cane per hectare (t/ha)
- **Why it matters:** Helps plan harvest timing, mill throughput, and revenue forecasting for mature crops.
- `r t("kpi_iv")`
- `r t("kpi_iv_calc")`
- `r t("kpi_categories")`
- `r t("kpi_iv_strong")`
- `r t("kpi_iv_weak")`
- `r t("kpi_iv_sli_decline")`
- `r t("kpi_iv_mod_decline")`
- `r t("kpi_iv_str_decline")`
- `r t("kpi_iv_why")`
- **KPI 4: Growth Decline (4-Week Trend)** — Assesses short-term growth trajectory using linear regression
- **Calculation:** Linear slope of CI values over the previous 4 weeks
- **Categories:**
- **Strong growth:** Slope > 0.1 CI units/week (excellent sustained progress)
- **Weak growth:** Slope 00.1 (slow improvement, monitor closely)
- **Slight decline:** Slope 0.10 (low severity, non-urgent observation)
- **Moderate decline:** Slope 0.3 to 0.1 (medium severity, scouting recommended)
- **Strong decline:** Slope < 0.3 (high severity, immediate field investigation required)
- **Why it matters:** Trend analysis reveals whether crop is accelerating, stalling, or stressed over time.
- `r t("kpi_v")`
- `r t("kpi_v_met1")`
- `r t("kpi_v_form")`
- `r t("kpi_v_range")`
- `r t("kpi_v_interpretation")`
- `r t("kpi_v_met2")`
- `r t("kpi_v_met2_range")`
- `r t("kpi_v_thresh")`
- `r t("kpi_v_risk")`
- `r t("kpi_v_minimal")`
- `r t("kpi_v_low")`
- `r t("kpi_v_medium")`
- `r t("kpi_v_high")`
- `r t("kpi_v_why")`
- **KPI 5: Field Patchiness (Heterogeneity)** — Combines two complementary spatial metrics for comprehensive heterogeneity assessment
- **Metric 1: Gini Coefficient** — Statistical measure of distribution inequality in CI pixel values
- **Formula:** (2 × Σ(i × sorted_CI)) / (n × Σ(sorted_CI)) (n+1)/n
- **Range:** 0 (perfectly uniform) to 1 (highly unequal)
- **Interpretation:** Low Gini (< 0.15) = good uniformity; High Gini (> 0.3) = significant heterogeneity
- **Metric 2: Moran's I** — Spatial autocorrelation indicating whether high/low areas are clustered or scattered
- **Range:** 1 (dispersed pattern) to +1 (strong clustering)
- **Thresholds:** Moran's I > 0.85 indicates clustered problem areas; < 0.75 suggests scattered issues
- **Risk Determination (Gini + Moran's I Combined):**
- **Minimal Risk:** Gini < 0.15 (excellent uniformity regardless of spatial pattern)
- **Low Risk:** Gini 0.150.30, Moran's I < 0.85 (moderate variation, scattered distribution)
- **Medium Risk:** Gini 0.150.30, Moran's I > 0.85 OR Gini 0.300.50, Moran's I < 0.85 (notable issues)
- **High Risk:** Gini > 0.30, Moran's I > 0.85 (severe heterogeneity with localized clusters—urgent scouting needed)
- **Why it matters:** High patchiness may indicate irrigation inefficiencies, localized pest pressure, fertility variation, or disease spread. Combined Gini + Moran's I reveals not just *how much* variation exists, but also *how it's distributed* spatially. CI reflects chlorophyll = nitrogen status + plant health + vigor. High CV/Patchiness often signals N gaps, water stress, pests (borers), or ratoon decline.
- `r t("unif_v_patch")`
- `r t("unif")`
- `r t("patch")`
- **Uniformity vs. Patchiness — What's the Difference?**
Both KPIs measure variation, but they answer different questions and drive different management actions:
- **Uniformity (CV-based)** answers: "*Is* growth even across the field?" — it detects whether a problem exists but not where.
- **Patchiness (Gini + Moran's I)** answers: "*Where* are problems and how are they arranged?" — it reveals the spatial pattern.
**Practical example:** Two fields both score "Poor" on Uniformity (CV = 0.25). However:
- Field A has scattered low-CI patches (Moran's I = 0.6) → suggests *random* stress (disease pressure, uneven irrigation)
- Field B has clustered low-CI in one corner (Moran's I = 0.95) → suggests *localized* problem (drainage, compaction, pest hotspot)
`r t("practical_example")`
Your scouting and remediation strategy should differ: Field A might need systemic irrigation adjustment or disease management; Field B might need soil remediation in the affected corner. **Patchiness tells you *where to focus your effort*.**
- `r t("field_a")`
- `r t("field_b")`
- **KPI 6: Gap Score (Establishment Quality)** — Quantifies field gaps and areas of poor crop establishment
- **Calculation Method:** Statistical outlier detection (2σ method)
- Identifies pixels with CI below: **Median CI (2 × Standard Deviation)**
- Calculates: **Gap Score = (Outlier Pixels / Total Pixels) × 100**
- Example: If 2 of 100 pixels fall below threshold → Gap Score = 2%
- **Score Ranges & Interpretation:**
- **010%:** Minimal gaps (excellent establishment, healthy field)
- **1025%:** Moderate gaps (monitor for expansion, coordinate with agronomy)
- **≥ 25%:** Significant gaps (consider targeted replanting or rehabilitation)
- **Why it matters:** Gap scores reveal areas of poor establishment that may indicate early growth problems or harvest-related residue issues. Lower is better (03% is typical for healthy fields).
`r t("scouting")`
2. **Overview Map: Growth on Farm:**
Provides a traffic light overview of field-by-field growth status for quick prioritization and reporting.
- `r t("kpi_vi")`
- `r t("kpi_vi_calc")`
- `r t("kpi_vi_identify")`
- `r t("kpi_vi_calculates")`
- `r t("kpi_vi_example")`
- `r t("kpi_vi_scores")`
- `r t("kpi_vi_0")`
- `r t("kpi_vi_10")`
- `r t("kpi_vi_25")`
- `r t("kpi_vi_why")`
3. **Chlorophyll Index Overview Map:**
Shows current CI values for all fields, helping to identify high- and low-performing areas.
4. **Field-by-Field Analysis:**
Includes detailed maps, trend graphs, and performance metrics for each field.
5. **Yield Prediction:**
For mature crops (over 240 days), yield is predicted using current and historical CI data.
6. **Farm Overview Table:**
Presents numerical field-level results for all KPIs.
`r t("sec_iii_2_to_6")`
---
### Historical Benchmark Lines
The CI time series graphs include historical benchmark lines for the 10th, 50th, and 90th percentiles of CI values across all fields and seasons.
**Note:** These lines are now all rendered as solid lines (not dashed or dotted), with different colors for each percentile.
- **10th Percentile:** Lower end of historical performance
- **50th Percentile:** Median historical performance
- **90th Percentile:** Upper end of historical performance
Comparing the current season to these lines helps assess whether crop growth is below, at, or above historical norms.
`r t("hist_benchmark")`
\newpage
`r t("metadata")`
@ -1797,7 +1763,7 @@ metadata_info <- data.frame(
Value = c(
format(Sys.time(), "%Y-%m-%d %H:%M:%S"),
paste(t("project"), toupper(project_dir)),
paste(t("week"), current_week, "of", year),
paste(t("week"), current_week, t("of"), year),
ifelse(exists("AllPivots0"), nrow(AllPivots0 %>% filter(!is.na(field)) %>% group_by(field) %>% summarise()), t("unknown")),
t("next_wed")
)

Binary file not shown.