From 62c61495a36c13ed3236128a555c0fa1c9c080e7 Mon Sep 17 00:00:00 2001 From: Beaudette Date: Tue, 14 Nov 2023 23:18:53 -0800 Subject: [PATCH] exposing new ecoclassid membership data --- R/fetchOSD.R | 2 ++ tests/testthat/test-fetchOSD.R | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/R/fetchOSD.R b/R/fetchOSD.R index bc543e64..974de359 100644 --- a/R/fetchOSD.R +++ b/R/fetchOSD.R @@ -84,6 +84,7 @@ #' \item{pmkind}{empirical probabilities for parent material kind, derived from the current SSURGO snapshot} #' \item{pmorigin}{empirical probabilities for parent material origin, derived from the current SSURGO snapshot} #' \item{mlra}{empirical MLRA membership values, derived from the current SSURGO snapshot} +#' \item{ecoclassid}{area cross-tabulation of ecoclassid by soil series name, derived from the current SSURGO snapshot, major components only} #' \item{climate}{experimental climate summaries from PRISM stack (CONUS only)} #' #' \item{NCCPI}{select quantiles of NCCPI and Irrigated NCCPI, derived from the current SSURGO snapshot} @@ -380,6 +381,7 @@ fetchOSD <- function(soils, colorState = 'moist', extended = FALSE) { pmkind = res$pmkind, pmorigin = res$pmorigin, mlra = res$mlra, + ecoclassid = res$ecoclassid, climate.annual = annual.data, climate.monthly = monthly.data, NCCPI = res$nccpi, diff --git a/tests/testthat/test-fetchOSD.R b/tests/testthat/test-fetchOSD.R index 94e8b199..80cbfe5a 100644 --- a/tests/testthat/test-fetchOSD.R +++ b/tests/testthat/test-fetchOSD.R @@ -2,7 +2,7 @@ context("fetchOSD() -- requires internet connection") ## these are the elements of the list returned when extended=TRUE ## update here as-needed -extended.table.names <<- c("SPC", "competing", "geog_assoc_soils" ,"geomcomp", "hillpos", "mtnpos", "terrace", "flats", "shape_across", "shape_down", "pmkind", "pmorigin", "mlra", "climate.annual", "climate.monthly", "NCCPI", "soilweb.metadata") +extended.table.names <<- c("SPC", "competing", "geog_assoc_soils" ,"geomcomp", "hillpos", "mtnpos", "terrace", "flats", "shape_across", "shape_down", "pmkind", "pmorigin", "mlra", "ecoclassid", "climate.annual", "climate.monthly", "NCCPI", "soilweb.metadata") test_that("fetchOSD() works", {