Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ncss-tech/soiltaxonomy
A System of Soil Classification for Making and Interpreting Soil Surveys
https://github.com/ncss-tech/soiltaxonomy
great-group ncss-tech soil soil-survey soil-taxonomy subgroup suborder usda
Last synced: about 1 month ago
JSON representation
A System of Soil Classification for Making and Interpreting Soil Surveys
- Host: GitHub
- URL: https://github.com/ncss-tech/soiltaxonomy
- Owner: ncss-tech
- License: gpl-3.0
- Created: 2016-02-09T23:10:37.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2024-05-07T23:31:17.000Z (8 months ago)
- Last Synced: 2024-09-13T15:14:04.517Z (3 months ago)
- Topics: great-group, ncss-tech, soil, soil-survey, soil-taxonomy, subgroup, suborder, usda
- Language: HTML
- Homepage: https://ncss-tech.github.io/SoilTaxonomy/
- Size: 50.5 MB
- Stars: 14
- Watchers: 6
- Forks: 2
- Open Issues: 10
-
Metadata Files:
- Readme: README.Rmd
- License: LICENSE.md
Awesome Lists containing this project
README
---
output: github_document
---```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```[![R-CMD-check](https://github.com/ncss-tech/SoilTaxonomy/workflows/R-CMD-check/badge.svg)](https://github.com/ncss-tech/SoilTaxonomy/actions/workflows/R-CMD-check.yml)
[![Codecov test coverage](https://codecov.io/gh/ncss-tech/SoilTaxonomy/branch/master/graph/badge.svg)](https://app.codecov.io/gh/ncss-tech/SoilTaxonomy?branch=master)
[![CRAN Status](https://www.r-pkg.org/badges/version-last-release/SoilTaxonomy)](https://cran.r-project.org/package=SoilTaxonomy)
[![runiverse-SoilTaxonomy](https://ncss-tech.r-universe.dev/badges/SoilTaxonomy)](https://github.com/ncss-tech/SoilTaxonomy)
[![SoilTaxonomy Manual](https://img.shields.io/badge/docs-HTML-informational)](https://ncss-tech.github.io/SoilTaxonomy/)# {SoilTaxonomy}
Taxonomic dictionaries, formative element lists, and functions related to the maintenance, development and application of U.S. Soil Taxonomy.
- Data and functionality are based on official U.S. Department of Agriculture sources including the latest edition of the Keys to Soil Taxonomy. Descriptions and metadata are obtained from the National Soil Information System or Soil Survey Geographic databases. Other sources are referenced in the data documentation.
- Provides tools for understanding and interacting with concepts in the U.S. Soil Taxonomic System. Most of the current utilities are for working with taxonomic concepts at the "higher" taxonomic levels: **Order**, **Suborder**, **Great Group**, and **Subgroup**.## Installation
Get the stable version from CRAN.
```r
install.packages("SoilTaxonomy")
```Get the development version from GitHub.
```r
remotes::install_github("ncss-tech/SoilTaxonomy")
``````{r}
library(SoilTaxonomy)
```### Soil Taxonomy Dictionaries
```{r}
# hierarchy: order to subgroup
data('ST', package = 'SoilTaxonomy')# unique taxa: just the taxon names (in order that they "key out" in the keys)
data('ST_unique_list', package = 'SoilTaxonomy')# formative element dictionary
data('ST_formative_elements', package = 'SoilTaxonomy')# codes denoting higher taxonomic parent-child relationships (12th Edition Keys to Soil Taxonomy)
data('ST_higher_taxa_codes_12th', package = 'SoilTaxonomy')# definitions of diagnostic features and characteristics (12th Edition Keys to Soil Taxonomy)
data('ST_features', package = 'SoilTaxonomy')# definitions of family-level classes and differentiae (12th Edition Keys to Soil Taxonomy)
data('ST_family_classes', package = 'SoilTaxonomy')
```### Vignettes
Several vignettes are included with the package to demonstrate basic functionality:
- [Taxon Letter Codes in Soil Taxonomy](https://ncss-tech.github.io/SoilTaxonomy/articles/taxon-letter-codes.html)
- [Diagnostic Features & Characteristics](https://ncss-tech.github.io/SoilTaxonomy/articles/diagnostics.html)
- [Family-level Taxonomic Classes](https://ncss-tech.github.io/SoilTaxonomy/articles/family-level_taxonomy.html)
### Featured FunctionsTwo helpful functions that make use of the internal lookup tables are `getTaxonAtLevel()`, `taxonTree()`, and `explainST()`
#### `getTaxonAtLevel()`: Get taxonomic levels within higher taxonomic groups
##### HHCH = _Acrudoxic Plinthic Kandiudults_
```{r}
getTaxonAtLevel('acrudoxic plinthic kandiudults') # level = "order" # defaultgetTaxonAtLevel('acrudoxic plinthic kandiudults', level = "suborder")
getTaxonAtLevel('acrudoxic plinthic kandiudults', level = "greatgroup")
getTaxonAtLevel('acrudoxic plinthic kandiudults', level = "subgroup")
```##### BA = _Folists_
```{r}
getTaxonAtLevel('folists')getTaxonAtLevel('folists', level = "suborder")
getTaxonAtLevel('folists', level = "greatgroup")
getTaxonAtLevel('folists', level = "subgroup")
```#### `taxonTree()`: Create `data.tree` representation of Soil Taxonomy Hierarchy
```{r}
# all hapludults and hapludalfs (to subgroup level)
taxonTree(c("hapludults", "hapludalfs"))
``````{r}
# suborders and great groups of alfisols
taxonTree("alfisols", root = "Alfisols", level = c("suborder", "greatgroup"))
```#### `explainST()`: Label formative elements with brief explanations
`explainST()` provides simple narrative explanations of the formative elements of taxa at the Order, Suborder, Great Group or Subgroup levels.
```{r}
cat(explainST('folistels'))cat(explainST('typic endoaqualfs'))
cat(explainST('abruptic haplic durixeralfs'))
# convert "taxon code" to taxon name (subgroup)
cat(explainST(taxon_code_to_taxon("ABCD"))) # ABCD = gypsic anhyturbels# all soil orders (LETTERS[1:12]; taxon codes A through L)
res <- lapply(LETTERS[1:12], function(l) cat(explainST(taxon_code_to_taxon(l)), "\n\n"))
```## Static Databases
The `./inst/extdata` folder (formerly `./databases`) of the GitHub repository formerly contained data tables related to taxonomic and map unit concepts within the U.S. Soil Survey Geographic Database (SSURGO).
These databases included:
- Statistics on taxonomic subgroups, family-level components, and soil series.
- MLRA Overlap tables for series, national map unit symbols and map unit keys.
- Summaries of KSSL records per series as well as geomorphic position, parent material origin and kind.
These tables have been moved to a dedicated repository called [SoilWeb-data](https://github.com/ncss-tech/SoilWeb-data).