Commit graph

19 commits

Author SHA1 Message Date
Timon 253ff51ca2 Add field patchiness KPI calculation and update summaries; replace weed pressure metrics with patchiness metrics in reports 2026-02-17 21:57:34 +01:00
Timon 34159b3003 Enhance yield prediction capabilities by integrating Random Forest model with Forward Feature Selection; add robust data loading and validation for harvesting data across multiple utility scripts. 2026-02-17 15:02:30 +01:00
DimitraVeropoulou e966d778f4 Enhance area change KPI calculation to handle multiple field naming conventions and improve interpretation logic for missing previous data 2026-02-16 16:05:54 +01:00
DimitraVeropoulou e16d920eea 1. removed gap score 2.fixed morans I to calculate per-field 2026-02-16 15:06:37 +01:00
DimitraVeropoulou 951eb487b8 Refactor KPI export function to excel file that matches cane supply strycture 2026-02-16 11:04:31 +01:00
DimitraVeropoulou eb1b7772e5 changed the named of the generated excel and rmd back to "kpi_summary_tables_week", as the 90 requests 2026-02-12 17:16:41 +01:00
DimitraVeropoulou 750db99a41 fixed the KPIs calculation for agronomic utils, fixed the path for saving the excel and rds, updated the main file 2026-02-12 15:43:58 +01:00
Timon Weitkamp dbc097e42c
Merge pull request #9 from TimonWeitkamp/review_perField_code
Review per field code
2026-02-11 15:11:13 +01:00
Timon 4cd62ab82e Enhance report utility functions and add validation scripts
- Updated `create_CI_map` and `create_CI_diff_map` functions to enforce a 1:1 aspect ratio for consistent map sizing.
- Modified `ci_plot` function to adjust widths of arranged maps for better layout.
- Changed raster merging method in `aggregate_per_field_mosaics_to_farm_level` from `mosaic` to `merge` for improved handling of field data.
- Introduced `test_kpi_validation.R` script to validate the structure of KPI RDS files, ensuring expected KPIs are present.
- Added `test_overview_maps_aggregation.R` script to test the aggregation pipeline for overview maps, including loading field mosaics, creating a farm-level mosaic, and generating visualizations.
2026-02-11 14:32:36 +01:00
DimitraVeropoulou 97d1ea33f1 add the 2σ calculate_gap_filling_kpi in common utils + comment out old function 2026-02-11 14:03:58 +01:00
Timon 2d6f062c27 changes again 2026-02-10 22:11:58 +01:00
Timon a40b9c1dfe coderabbit fixes 2026-02-10 22:01:02 +01:00
Timon dd83a9e27f some messy updates to script 90, wil l need to do some cleaning tomorrow... 2026-02-10 21:53:49 +01:00
Timon 3d3df151d3 Update .gitignore to include cache files, enhance R Markdown report paths, and improve KPI calculation script for clarity and error handling 2026-02-10 17:50:12 +01:00
Timon f2da320fb6 Refactor KPI calculation scripts for improved error handling and clarity 2026-02-10 16:12:07 +01:00
Timon b1b96e6c6a gap filling worked to per-field 2026-02-10 16:01:59 +01:00
Timon 054cc85bdb small issues 2026-02-10 15:38:23 +01:00
Timon e16677eb78 aura until word creation works. word cration itself needs more work. 2026-02-04 12:24:02 +01:00
Timon 8d560ff155 SC-112 Phase 2 Complete: Restructure Script 80 utilities by client type
- Consolidate 80_kpi_utils.R, 80_weekly_stats_utils.R, 80_report_building_utils.R into three client-aware files:
  - 80_utils_common.R (50+ functions): Shared utilities, constants, and helpers
  - 80_utils_agronomic_support.R: AURA-specific KPI calculations (6 KPIs)
  - 80_utils_cane_supply.R: ANGATA placeholder for future expansion
- Move all internal helpers (calculate_cv, calculate_change_percentages, calculate_spatial_autocorrelation, extract_ci_values, etc.) to common
- Add MORAN_THRESHOLD_* constants to common
- Fix parameters_project.R field boundaries path (removed extra 'Data' directory)
- Update 80_calculate_kpis.R with conditional client-type sourcing logic
- Validate both ANGATA (cane_supply) and AURA (agronomic_support) workflows with comprehensive testing
- All 96+ functions accounted for; ready for production use
2026-02-03 17:21:35 +01:00