Skip to content

Commit 95729e8

Browse files
committed
move prep table makkink to dev/bln_tables
1 parent 2d54de8 commit 95729e8

File tree

2 files changed

+20
-17
lines changed

2 files changed

+20
-17
lines changed

dev/bln_tables.R

+20-1
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,12 @@
4949
crop_name = B_LU_NAME,
5050
crop_cat1 = B_LU_CULTCAT4,
5151
bln_country ="NL",
52+
B_LU = B_LU,
5253
B_LU_EOM,
5354
B_LU_EOM_RESIDUE,
5455
B_LU_HC,
55-
B_LU_WATERSTRESS_OBIC
56+
B_LU_WATERSTRESS_OBIC,
57+
B_LU_MAKKINK
5658
)]
5759

5860
# replace löss with loess
@@ -67,6 +69,23 @@
6769
# save updated crop table
6870
usethis::use_data(bln_crops,overwrite = TRUE)
6971

72+
# make makkink table
73+
74+
# load csv file with makkink per crop per month
75+
dt <- fread('dev/bln_makkink.csv',header = TRUE)
76+
77+
# colnames for the 12 months
78+
cols <- colnames(dt)[-1]
79+
80+
# replace all missing values with the value 0.36 for braak soil
81+
dt[,c(cols) := lapply(.SD,function(x) fifelse(is.na(x),0.36,x)),.SDcols = cols]
82+
83+
# write file to data
84+
bln_makkink <- copy(dt)
85+
86+
# write file to data
87+
usethis::use_data(bln_makkink, overwrite = TRUE)
88+
7089
# make LSW table with the averaged properties across whole NL
7190

7291
# set LSW to averaged values across whole NL

dev/prep_bln_makkink.R

-16
This file was deleted.

0 commit comments

Comments
 (0)