Spatial prediction of mineral nitrogen on arable fields using random forest: a comparative study
Code and data used in the publication “Spatial prediction of mineral nitrogen on arable fields using random forest: a comparative study”. The numerical input data includes measured nitrate nitrogen (N-NO3) and ammonium nitrogen (N-NH4) values expressed in mg/dm^3 for wheat and rape fields in three depths (30, 60 and 90 cm). Vector data with fields boundaries and measuring point locations are included. The raster data includes Digital Terrain Model and multispectral images from Sentinel-2. The explanatory variables were processed in the attached scripts in the R language. The results of the analysis are fully reproducible (specific randomness seeds were used). The data was obtained under a grant "POIR 04.01.02-00-0110/17-00" financed by The National Centre for Research and Development in Poland.
Steps to reproduce
1. Set the correct data path. 2. Run the script with the selected interpolation method in the file name. 3. To visualize prediction results and spatial errors, run the "visualizations" script.