Skip to content

Instantly share code, notes, and snippets.

#This script downloads soilgrids (https://www.isric.org/explore/soilgrids) data
#at a given resolution (variable "res", in degrees) and the depth intervals 0-5 and 5-15
#to compute the mean for the depth interval 0-15.
#It also applies the conversion factor shown in the FAQ (https://www.isric.org/explore/soilgrids/faq-soilgrids#How_can_I_access_SoilGrids)
#to reconstitute the original data units.
library(gdalUtils)
library(raster)
#variables to download