File size: 5,993 Bytes
9bc98d9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
{
  "LUCAS_21681_points/NoSensitive.csv": {
    "ENTRY_KEY": "'_'.join(['lucas2009', as_int_id(【POINT_ID】), as_int_id(【sample_ID】)])",
    "LAT_LONG": "(as_float(【LAT】), as_float(【LONG】))",
    "COUNTRY_CODE": "【nuts0】",
    "SAMPLE_DATE": "datetime.strptime(【SURV_DATE】, '%d%b%Y:%H:%M:%S').strftime('%d-%m-%Y') if 【SURV_DATE】 else 'XX-XX-2009'",
    "SAMPLE_DEPTH_RANGE_CM": "[0, 20]",
    "texture": {
      "clay_percentage (%)": "as_float(【clay】)",
      "silt_percentage (%)": "as_float(【silt】)",
      "sand_percentage (%)": "as_float(【sand】)",
      "coarse_percentage (%)": "as_float(【coarse】)"
    },
    "chemical": {
      "pH_in_H2O": "as_float(【pH_in_H2O】)",
      "pH_in_CaCl2": "as_float(【pH_in_CaCl】)"
    },
    "carbon": {
      "organic_carbon_content (g/kg)": "as_float(【OC】)",
      "CaCO3_content (g/kg)": "as_float(【CaCO3】)"
    },
    "fertility": {
      "N_extractable (g/kg)": "as_float(【N】)",
      "K_extractable (mg/kg)": "as_float(【K】)",
      "P_extractable (mg/kg)": "as_float(【P_x】)",
      "P_total_content (mg/kg)": "as_float(【PTotal】)",
      "cation_exchange_capacity (cmol(+)/kg)": "as_float(【CEC】)"
    },
    "soil_type": {
      "WRB_soil_group": "【WRB_LV1】"
    },
    "management": {
      "water_management_measure": "resolve_code(【WM_WATER_M】, codebook='lucas_mix', top_key='water_management_measure', ignore_error_codes=['0'])",
      "water_management_irrigation_source": "resolve_code(【WM_SRC_IRR】, codebook='lucas_mix', top_key='water_management_irrigation_source', ignore_error_codes=['0', '6'])",
      "water_management_irrigation_type": "resolve_code(【WM_TYP_IRR】, codebook='lucas_mix', top_key='water_management_irrigation_type', ignore_error_codes=['0', '6'])",
      "water_management_delivery": "resolve_code(【WM_DELIVER】, codebook='lucas_mix', top_key='water_management_delivery', ignore_error_codes=['0', '4'])"
    },
    "land_site": {
      "land_cover_primary": "resolve_code(【LC1】, codebook='lucas_lc', ignore_error_codes=['8', 'MISSING'])",
      "land_cover_secondary": "resolve_code(【LC2】, codebook='lucas_lc', ignore_error_codes=['8', 'MISSING'])",
      "land_use_primary": "resolve_code(re.sub('^U', '', str(【LU1】)), codebook='lucas_lu', ignore_error_codes=['8', 'MISSING'])",
      "land_use_secondary": "resolve_code(re.sub('^U', '', str(【LU2】)), codebook='lucas_lu', ignore_error_codes=['8', 'MISSING'])",
      "plot_area_size (ha)": "resolve_code(【AREA_SIZE】, codebook='lucas_mix', top_key='plot_area_size (ha)', ignore_error_codes=['0'])",
      "tree_height_maturity (m)": "resolve_code(【TREES_HEIG】, codebook='lucas_mix', top_key='tree_height_maturity (m)', ignore_error_codes=['0'])",
      "sign_of_grazing": "resolve_code(【LAND_MNGT】, codebook='lucas_mix', top_key='sign_of_grazing', ignore_error_codes=['3', '0'])",
      "sign_of_ploughing": "resolve_code(【SOIL_PLOUG】, codebook='lucas_mix', top_key='sign_of_ploughing', ignore_error_codes=['0'])",
      "cover_of_residual_crop (%)": "resolve_code(【SOIL_CROP】, codebook='lucas_mix', top_key='cover_of_residual_crop (%)', ignore_error_codes=['0'])",
      "cover_of_stones (%)": "resolve_code(【SOIL_STONE】, codebook='lucas_mix', top_key='cover_of_stones (%)', ignore_error_codes=['0'])"
    },
    "climate": {
      "annual_precipitation (mm)": "as_float(【AnnualPrec】)"
    },
    "topography_geology": {
      "elevation (m)": "as_float(【Elevation(m)】)",
      "slope (deg)": "as_float(【slope (Degrees)】)",
      "parent_material_primary": "【ParMat1】",
      "parent_material_secondary": "【ParMat2】"
    },
    "ASSETS": {
      "psd_spectrum": "f\"psd/{'_'.join(['lucas2009', as_int_id(【POINT_ID】), as_int_id(【sample_ID】)])}.npz\""
    }
  },
  "LUCAS_Romania_Bulgaria_2012/Bulgaria.csv": {
    "ENTRY_KEY": "'_'.join(['lucas2012BG', as_int_id(【POINT_ID】), as_int_id(【SoilID】)])",
    "LAT_LONG": "(as_float(【GPS_Y_LAT】), as_float(【GPS_X_LONG】))",
    "COUNTRY_CODE": "'BG'",
    "SAMPLE_DATE": "'XX-XX-2012'",
    "SAMPLE_DEPTH_RANGE_CM": "[0, 20]",
    "texture": {
      "clay_percentage (%)": "as_float(【clay】)",
      "silt_percentage (%)": "as_float(【silt】)",
      "sand_percentage (%)": "as_float(【sand】)",
      "coarse_percentage (%)": "as_float(【coarse】)"
    },
    "chemical": {
      "pH_in_H2O": "as_float(【pHinH2O】)",
      "pH_in_CaCl2": "as_float(【pHinCaCl2】)"
    },
    "carbon": {
      "organic_carbon_content (g/kg)": "as_float(【OC】)",
      "CaCO3_content (g/kg)": "as_float(【CaCO3】)"
    },
    "fertility": {
      "N_extractable (g/kg)": "as_float(【N】)",
      "K_extractable (mg/kg)": "as_float(【K】)",
      "P_extractable (mg/kg)": "as_float(【P】)",
      "cation_exchange_capacity (cmol(+)/kg)": "as_float(【CEC】)"
    }
  },
  "LUCAS_Romania_Bulgaria_2012/Romania.csv": {
    "ENTRY_KEY": "'_'.join(['lucas2012RO', as_int_id(【POINTID】), as_int_id(【SoilID】)])",
    "LAT_LONG": "(as_float(【GPSYLAT】), as_float(【GPSXLONG】))",
    "COUNTRY_CODE": "'RO'",
    "SAMPLE_DATE": "'XX-XX-2012'",
    "SAMPLE_DEPTH_RANGE_CM": "[0, 20]",
    "texture": {
      "clay_percentage (%)": "as_float(【clay】)",
      "silt_percentage (%)": "as_float(【silt】)",
      "sand_percentage (%)": "as_float(【sand】)",
      "coarse_percentage (%)": "as_float(【coarse】)"
    },
    "chemical": {
      "pH_in_H2O": "as_float(【pHinH2O】)",
      "pH_in_CaCl2": "as_float(【pHinCaCl2】)"
    },
    "carbon": {
      "organic_carbon_content (g/kg)": "as_float(【OC】)",
      "CaCO3_content (g/kg)": "as_float(【CaCO3】)"
    },
    "fertility": {
      "N_extractable (g/kg)": "as_float(【N】)",
      "K_extractable (mg/kg)": "as_float(【K】)",
      "P_extractable (mg/kg)": "as_float(【P】)",
      "cation_exchange_capacity (cmol(+)/kg)": "as_float(【CEC】)"
    }
  }
}