Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Several suggestions for management evaluation #29

Merged
merged 4 commits into from
Oct 31, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* Update of crumbeability groups in `crops.obic`
* Maximum value of A_MN_CC is increased from 30000 to 250000
* The code for evaluating in `ind_crumbeability` is simplified
* M_M10 user input changed in D_CP_RUST input, plus comments added #29

### Fixed
* Preprocessing, indicators and scores make use of internal copy of the table now rather than referencing to an object outside the scope of the function
Expand Down
11 changes: 10 additions & 1 deletion R/management.R
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,8 @@ calc_management <- function(A_OS_GV,B_LU_BRP, B_BT_AK,B_GT,
dt.arable = dt[crop_n == 'akkerbouw']

# measure 1. is the parcel for 80% of the year grown by a crop (add 3 points)
dt.arable[M_M10==TRUE, value := value + 3]
# calculate from fraction rustgewassen (suggestion of Wim)
dt.arable[D_CP_RUST > 0.60, value := value + 3]

# measure 2. is minimal 40% of the deep rooting crops (add one point)
dt.arable[D_CP_RUST > 0.4, value := value + 1]
Expand All @@ -103,6 +104,10 @@ calc_management <- function(A_OS_GV,B_LU_BRP, B_BT_AK,B_GT,
# measure 3. crop rotation of potato is at minimum 1:4 (add two points)
dt.arable[D_CP_POTATO > 0.15 & D_CP_POTATO <= 0.25, value := value + 2]

# Here one measure is missing, compared to the table of Van der Wal et al.:
# Gebruik van technieken die hoeveelheid gewasbeschermingsmiddelen reduceren
# Do we need to include one more M_ variable for this measurement?

# measure 4. use of early varieties in relevant cultures to avoid harvesting after september (stimulating catch crop too)
dt.arable[grepl('mais|aardappel|bieten, suiker',crop_name) & M_M11==TRUE, value := value + 1]

Expand All @@ -121,6 +126,10 @@ calc_management <- function(A_OS_GV,B_LU_BRP, B_BT_AK,B_GT,
# measure 9. is heavy machinery avoided by slurry application
dt.arable[soiltype.n !='veen' & M_M12==TRUE, value := value + 1]

# measure 6(?). are catchcrops sown after main crop
# In Van der Wal et al 2016: Gebruik vanggewassen na maïsoogst (alleen klei, zand en löss al verplicht)
dt.arable[grepl('mais',crop_name) & soiltype.n =='klei' & M_M6 == TRUE, value := value + 1]

# negative scores may not occur
dt.arable[value < 0, value := 0]

Expand Down