===== Script used to prepare BCI.soil data from the accessible Excel dataset ===== The original Excel file was downloaded [[http://ctfs.arnarb.harvard.edu/webatlas/datasets/bci/soilmaps/bci.block20.data.xls|here]] and the second worksheet (//means (20 X 20 m)//) was saved as {{https://raw.githubusercontent.com/zdealveindy/anadat-r/master/data/bci-soil-20x20.txt|}} file and uploaded to this website. Further, the file was resampled into 1ha plots (i.e. values within 25 20x20 m plots have been averaged): soil20x20 <- read.delim ('https://raw.githubusercontent.com/zdealveindy/anadat-r/master/data/bci-soil-20x20.txt') BCI.soil <- NULL for (x in seq (10, 990, by = 100)) for (y in seq (10, 490, by = 100)) BCI.soil <- rbind (BCI.soil, colMeans (soil20x20[soil20x20$x >= x & soil20x20$x < (x+100) & soil20x20$y >= y & soil20x20$y < (y+100),])) BCI.soil <- as.data.frame (BCI.soil) write.table (BCI.soil, file = 'BCI.soil.txt', sep = '\t') =====Script used to create soil maps===== soil20x20 <- read.delim ('https://raw.githubusercontent.com/zdealveindy/anadat-r/master/data/bci-soil-20x20.txt') filled.contour (matrix (soil20x20$pH, ncol = 25, byrow = T), color.palette = terrain.colors, main = 'pH') filled.contour (matrix (soil20x20$N, ncol = 25, byrow = T), color.palette = terrain.colors, main = 'Nitrogen') {{:obrazky:bci-ph.png?500|}} {{:obrazky:bci-nitrogen.png?500|}}