options(timeout = 180) knitr::opts_chunk$set(echo = FALSE, message = FALSE, warning = FALSE)
A soil "knowledge base" centered around the National Cooperative Soil Survey (NCSS) standards.
These are standards developed and maintained by the United States Department of Agriculture Natural Resources Conservation Service (USDA-NRCS) Soil and Plant Science Division (SPSD). They are defined in the National Soil Survey Handbook (NSSH*)
The contents of this repository are completely reproducible. You can build an instance of all of the external data from scratch if you install the package off GitHub and run the refresh()
command.
This repository is an R package that facilitates management of dependencies, continuous integration, version control of and limited programmatic access to products from official data sources.
# install.packages("remotes") remotes::install_github("ncss-tech/SoilKnowledgeBase") # install all remote data to inst/extdata SoilKnowledgeBase::refresh()
The repository is regularly updated to reflect changes that happen in a variety of official data sources.
Depending on your application you may be better off simply cloning the repository and calling git pull
on a schedule that is convenient for you.
The materials provided in this repository are generally defined somewhere within the NSSH. For now, only top-level links to whole sections of the handbook are available.
These links connect to eDirectives which are the official sources of standards of this nature.
# do a full refresh library(SoilKnowledgeBase) # if any of these failed to download stopifnot(all(unlist(refresh(keep_pdf = TRUE)))) # access the assets dat <- get_assets('inst/extdata/NSSH', 'index')[[1]] .doAbbreviate <- function(x) { xx <- gsub("National Cooperative Soil Survey", "NCSS", x) gsub("Quality Control, Quality Assurance,", "QC/QA*", xx) } dat$parent <- .doAbbreviate(dat$parent) dat$href <- sprintf("[LINK](%s)", dat$href) dat$part_subpart <- paste(dat$part, dat$subpart) knitr::kable(dat[,c('part_subpart', 'parent', 'section', 'href')], col.names = c("Part & Subpart", "Part Name", "Section", "Link"))
nssh_headers <- get_assets('inst/extdata/NSSH', 'headers')[[1]] if (!is.null(nssh_headers)) { knitr::kable(nssh_headers[, c("part", "subpart", "header")], row.names = FALSE, col.names = c("Part", "Subpart", "Header")) }
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.