Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

taxaExtent

Retrieve Soil Taxonomy Membership Grids


Description

This function downloads a generalized representation of the geographic extent of any single taxa from the top 4 tiers of Soil Taxonomy. Data are provided by SoilWeb, ultimately sourced from from the current SSURGO snapshot. Data are returned as raster objects representing area proportion falling within 800m cells. Data are only available in CONUS and returned using an Albers Equal Area / NAD83 coordinate reference system (EPSG 6350).

Usage

taxaExtent(
  x,
  level = c("order", "suborder", "greatgroup", "subgroup"),
  timeout = 60
)

Arguments

x

single taxa name, case-insensitive

level

the taxonomic level within the top 4 tiers of Soil Taxonomy, one of c('order', 'suborder', 'greatgroup', 'subgroup')

timeout

time that we are willing to wait for a response, in seconds

Value

a raster object

Note

This is a work in progress.

Author(s)

D.E. Beaudette

Examples

if(requireNamespace("curl") &
   curl::has_internet()) {
  
  library(raster)
  
  # try a couple of different examples
  
  # soil order
  taxa <- 'vertisols'
  x <- taxaExtent(taxa, level = 'order')
  a <- raster::aggregate(x, fact = 5)
  
  # suborder
  taxa <- 'ustalfs'
  x <- taxaExtent(taxa, level = 'suborder')
  a <- raster::aggregate(x, fact = 5)
  
  # greatgroup
  taxa <- 'haplohumults'
  x <- taxaExtent(taxa, level = 'greatgroup')
  a <- raster::aggregate(x, fact = 5)
  
  # subgroup
  taxa <- 'Typic Haploxerepts'
  x <- taxaExtent(taxa, level = 'subgroup')
  a <- raster::aggregate(x, fact = 5)
  
  # quick evaluation of the result
  if(requireNamespace("rasterVis") & requireNamespace('viridisLite')) {
    rasterVis::levelplot(a, 
      margin = FALSE, scales = list(draw = FALSE), 
      col.regions = viridisLite::viridis, 
      main = names(a)
    )
  }
  
  # slippy map
  if(requireNamespace("mapview")) {
    mapview::mapview(a, col.regions = viridisLite::viridis, na.color = NA, use.layer.names = TRUE)
  }
  
  
  
}

soilDB

Soil Database Interface

v2.6.1
GPL (>= 3)
Authors
Dylan Beaudette [aut], Jay Skovlin [aut], Stephen Roecker [aut], Andrew Brown [aut, cre]
Initial release
2021-04-7

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.