Learn R Programming

soilDB (version 2.8.8)

get_SDA_property: Get map unit properties from Soil Data Access

Description

Get map unit properties from Soil Data Access

Usage

get_SDA_property(
  property,
  method = c("Dominant Component (Category)", "Weighted Average", "Min/Max",
    "Dominant Component (Numeric)", "Dominant Condition", "None"),
  areasymbols = NULL,
  mukeys = NULL,
  WHERE = NULL,
  top_depth = 0,
  bottom_depth = 200,
  FUN = NULL,
  include_minors = FALSE,
  miscellaneous_areas = FALSE,
  query_string = FALSE,
  dsn = NULL
)

Value

a data.frame with result

Arguments

property

character vector of labels from property dictionary tables (see details) OR physical column names from component or chorizon table.

method

one of: "Dominant Component (Category)", "Dominant Component (Numeric)", "Weighted Average", "MIN", "MAX", "Dominant Condition", or "None". If "None" is selected, the number of rows returned will depend on whether a component or horizon level property was selected, otherwise the result will be 1:1 with the number of map units.

areasymbols

vector of soil survey area symbols

mukeys

vector of map unit keys

WHERE

character containing SQL WHERE clause specified in terms of fields in legend or mapunit tables, used in lieu of mukeys or areasymbols. With aggregation method "NONE" the WHERE clause may additionally contain logic for columns from the component and chorizon table.

top_depth

Default: 0 (centimeters); a numeric value for upper boundary (top depth) used only for method="Weighted Average", "Dominant Component (Numeric)", and "MIN/MAX"

bottom_depth

Default: 200 (centimeters); a numeric value for lower boundary (bottom depth) used only for method="Weighted Average", "Dominant Component (Numeric)", and "MIN/MAX"

FUN

Optional: character representing SQL aggregation function either "MIN" or "MAX" used only for method="min/max"; this argument is calculated internally if you specify method="MIN" or method="MAX"

include_minors

Include minor components in "Weighted Average" or "MIN/MAX" results? Default: TRUE

miscellaneous_areas

Include miscellaneous areas (non-soil components) in results? Default: FALSE. Now works with all method types)

query_string

Default: FALSE; if TRUE return a character string containing query that would be sent to SDA via SDA_query

dsn

Path to local SQLite database or a DBIConnection object. If NULL (default) use Soil Data Access API via SDA_query().

Author

Jason Nemecek, Chad Ferguson, Andrew Brown

Details

The property argument refers to one of the property names or columns specified in the tables below. Note that property can be specified as either a character vector of labeled properties, such as "Bulk Density 0.33 bar H2O - Rep Value", OR physical column names such as "dbthirdbar_r". To get "low" and "high" values for a particular property, replace the _r with _l or _h in the physical column name; for example property = c("dbthirdbar_l","dbthirdbar_r","dbthirdbar_h"). You can view exhaustive lists of component and component horizon level properties in the Soil Data Access "Tables and Columns Report".

Selected Component-level Properties

Property (Component)Column
Range Production - Favorable Yearrsprod_h
Range Production - Normal Yearrsprod_r
Range Production - Unfavorable Yearrsprod_l
Corrosion of Steelcorsteel
Corrosion of Concretecorcon
Drainage Classdrainagecl
Hydrologic Grouphydgrp
Taxonomic Class Nametaxclname
Taxonomic Ordertaxorder
Taxonomic Subordertaxsuborder
Taxonomic Temperature Regimetaxtempregime
Wind Erodibility Groupweg
Wind Erodibility Indexwei
t Factortfact

Selected Horizon-level Properties

Property (Horizon)Column
0.1 bar H2O - Rep Valuewtenthbar_r
0.33 bar H2O - Rep Valuewthirdbar_r
15 bar H2O - Rep Valuewfifteenbar_r
Available Water Capacity - Rep Valueawc_r
Bray 1 Phosphate - Rep Valuepbray1_r
Bulk Density 0.1 bar H2O - Rep Valuedbtenthbar_r
Bulk Density 0.33 bar H2O - Rep Valuedbthirdbar_r
Bulk Density 15 bar H2O - Rep Valuedbfifteenbar_r
Bulk Density oven dry - Rep Valuedbovendry_r
CaCO3 Clay - Rep Valueclaysizedcarb_r
Calcium Carbonate - Rep Valuecaco3_r
Cation Exchange Capacity - Rep Valuecec7_r
Coarse Sand - Rep Valuesandco_r
Coarse Silt - Rep Valuesiltco_r
Effective Cation Exchange Capacity - Rep Valueecec_r
Electrial Conductivity 1:5 by volume - Rep Valueec15_r
Electrical Conductivity - Rep Valueec_r
Exchangeable Sodium Percentage - Rep Valueesp_r
Extract Aluminum - Rep Valueextral_r
Extractable Acidity - Rep Valueextracid_r
Fine Sand - Rep Valuesandfine_r
Fine Silt - Rep Valuesiltfine_r
Free Iron - Rep Valuefreeiron_r
Gypsum - Rep Valuegypsum_r
Kfkffact
Kikifact
Krkrfact
Kwkwfact
LEP - Rep Valuelep_r
Liquid Limit - Rep Valuell_r
Medium Sand - Rep Valuesandmed_r
Organic Matter - Rep Valueom_r
Oxalate Aluminum - Rep Valuealoxalate_r
Oxalate Iron - Rep Valuefeoxalate_r
Oxalate Phosphate - Rep Valuepoxalate_r
Plasticity Index - Rep Valuepi_r
Rock Fragments 3 - 10 inches - Rep Valuefrag3to10_r
Rock Fragments > 10 inches - Rep Valuefraggt10_r
Rubbed Fiber % - Rep Valuefiberrubbedpct_r
Satiated H2O - Rep Valuewsatiated_r
Saturated Hydraulic Conductivity - Rep Valueksat_r
Sodium Adsorption Ratio - Rep Valuesar_r
Sum of Bases - Rep Valuesumbases_r
Total Clay - Rep Valueclaytotal_r
Total Phosphate - Rep Valueptotal_r
Total Sand - Rep Valuesandtotal_r
Total Silt - Rep Valuesilttotal_r
Unrubbed Fiber % - Rep Valuefiberunrubbedpct_r
Very Coarse Sand - Rep Valuesandvc_r
Very Fine Sand - Rep Valuesandvf_r
Water Soluble Phosphate - Rep Valueph2osoluble_r
no. 10 sieve - Rep Valuesieveno10_r
no. 200 sieve - Rep Valuesieveno200_r
no. 4 sieve - Rep Valuesieveno4_r
no. 40 sieve - Rep Valuesieveno40_r
pH .01M CaCl2 - Rep Valueph01mcacl2_r
pH 1:1 water - Rep Valueph1to1h2o_r
pH Oxidized - Rep Valuephoxidized_r

Examples

Run this code
# \donttest{

 # get 1/3 bar bulk density [0,25] centimeter depth weighted average from dominant component
 get_SDA_property(property = c("dbthirdbar_l","dbthirdbar_r","dbthirdbar_h"),
                  method = "Dominant Component (Numeric)",
                  areasymbols = "CA630",
                  top_depth = 0,
                  bottom_depth = 25)
# }

Run the code above in your browser using DataLab