soilQuery: Query SoilGrids via the REST API

View source: R/soilQuery.R

soilQueryR Documentation

Query SoilGrids via the REST API

Description

See https://rest.soilgrids.org/soilgrids/v2.0/docs for more information

Usage

soilQuery(
  x,
  plot_id = "plot_id",
  longitude_of_centre = "longitude_of_centre",
  latitude_of_centre = "latitude_of_centre",
  attrib = c("cec", "cfvo", "clay", "nitrogen", "ocd", "ocs", "phh20", "sand", "silt",
    "soc"),
  depth = c("0-5", "5-15", "15-30", "30-60", "60-100", "100-200"),
  average = list(c(0, 30)),
  value = "mean"
)

Arguments

x

dataframe of plot level data

plot_id

column name string of plot IDs

longitude_of_centre

column name string of plot longitude

latitude_of_centre

column name string of plot latitude

attrib

vector of soil attributes to extract

depth

vector of soil depths over which to extract the attributes, e.g. 0-5, 30-60

average

optional list of vectors, each of length 2, describing ranges of depths over which to average (mean) the values of attrib

value

vector of soil values to extract for each attribute, e.g. mean, Q0.05

Details

See soilQueryOptions() for all possibly combinations of attrib, depth, and value

Value

dataframe of soil values by depth


johngodlee/JLGMisc documentation built on June 29, 2024, 9:15 p.m.