Releases: ncss-tech/soilDB
soilDB 2.7.5
soilDB 2.7.5 (2022-10-17)
- Updates to SSURGO File Geodatabase functions (
fetchGDB()
and related) by @smroecker - Added
soilColor.wcs()
to access a web coverage service for soil color at various depths by @dylanbeaudette waterDayYear()
: fix for CRAN and different timezones; now defaults totz="UTC"
#268summarizeSoilTemperature()
: set default timezone totz="UTC"
- Fix for
uncode()
on pre-decoded values when ChoiceName and ChoiceLabel overlap #273- Fix for
NASISChoiceList()
related to #273
- Fix for
get_soilseries_from_NASIS()
: Removeareaacres
andobterm
for #272 by @smroecker- Fix for
get_OSD(..., fix_ocr_errors = TRUE)
with empty typical profile for #271 by @dylanbeaudette fetchNASIS()
drops non-representative and additional whendropNotRepresentative
/dropAdditional
are set (@natearoe)- Fix for
as.POSIXct()
in R 4.3+; for #265 - Fix for "status was 'SSL connect error" for
fetchKSSL()
and other functions that download JSON (@Kramdog)- Now uses standard soilDB {curl} handle, which includes a longer timeout and
ssl_verifyhost=0
- Now uses standard soilDB {curl} handle, which includes a longer timeout and
- Fixes for compatibility with {jsonlite} >1.8.1 that now uses {base} rather than {curl}
- Update row count expectations for end of FY22 SSURGO refresh
soilDB 2.7.4
soilDB 2.7.4 (2022-09-30)
-
uncode()
replaced\(x)
syntax inadvertently included in a recent update to fix R < 4.1 compatibility; thanks to @cbrueffer for catching this (#262)! -
get_SDA_property()
fixes for weighted average method (#229, #261) -
fetchOSD()
now automatically encodes horizon distinctness codes to default depth offsets, stored in hz-level attr:hzd
soilDB 2.7.3
soilDB 2.7.3 (2022-08-19)
-
get_SDA_property()
all methods now supportmiscellaneous_areas
argument. This defaults toFALSE
for the methods it was previously implemented for--so be aware that queries using"Dominant Component"
or"Dominant Condition"
(which previously did not respond tomiscellaneous_areas
) may have the number of rows in result reduced due to omission of miscellaneous land types. If this is unexpected or undesired, please usemiscellaneous_areas=TRUE
. (#257) -
Adds
get_NASIS_metadata()
and helper methodget_NASIS_column_metadata()
and other new tools for working withuncode()
, factors and NASIS metadata cached in the package. -
Bug fix for
get_cosoilmoist_from_SDA()
; thanks to Monika Shea @monikashea for reporting the problem (#253) -
fetchNASIS_report()
now works with the output from"get_site_from_NASIS"
report (useful for site records without associated pedons) -
createSSURGO()
gains argumentsquiet
andinclude_spatial
to toggle messages and inclusion of spatial data in created SQLite database, respectively -
downloadSSURGO()
now handles queries againstsacatalog
that return no results more gracefully -
get_OSD()
: Addfix_ocr_errors
argument forresult='json'
to fix common optical character recognition errors associated with horizon designations and colors (NOTE: does NOT fix depths) -
fetchSCAN()
gainstimeseries
argument to support batch downloads of hourly data. Additional arguments (...
) are passed as a raw request, allowing other parameters sent in request to be modified if needed, and bypassing batch functionality. This is similar to thereq
argument syntax used in earlier versions of this function, which had been deprecated for some time now. Thanks to Matthew Morriss for raising the discussion item @morrismc99 (#260). -
{curl} moved from Suggests to Imports;
curl::curl_download()
is now used instead ofutils::download.file()
because it seems to handle SSL certificates better on some networks.
soilDB 2.7.2
soilDB 2.7.2 (2022-06-27)
-
fetchNASIS("components')
: Fix and refactor ( breaking change from 2.7.1, which introduced a bug/inconsistency) of recent change;duplicates
argument is now required to merge in data from mapunit/legend tables (where many:1 relationships between legend/mapunit and datamapunit are possible). In 2.7.1 possibly incomplete mapunit/legend tables could be joined to SoilProfileCollection result (if and only if the tables were populated in selected set/local DB). Does not change historic (<=2.7.0) default behavior. Thanks to @dylanbeaudette for suggesting use ofget_component_correlation_data_from_NASIS_db()
here. -
Several fixes for Roxygen documentation (notably for
ROSETTA()
and various NASIS web report related functions) that were missing@export
tags. Several previously-exported functions missed being explicitly exported in the new Roxygen-generate NAMESPACE. These unintentional omissions from 2.7.1 NAMESPACE have been resolved. -
Fixes an old bug in
fetchSDA()
/get_chorizon_from_SDA()
related to LEFT OUTER versus RIGHT JOIN tochtexture
table
soilDB 2.7.1
soilDB 2.7.1 (2022-06-10)
get_SDA_coecoclass()
better handling ofNULL
ecoclassref
; support for filtering onecoclasstypename
;not_assigned_value
now applies toecoclassname
,ecoclasstypename
andecoclassref
columns in addition toecoclassid
; Thanks to Andy Paolucci and Jason Nemecek. Also, added additional columns from legend/mapunit tables (areasymbol
,lkey
,muname
).fetchNASIS(from="components")
now returns mapunit and legend information (if loaded in local NASIS database); results now containmustatus
andrepdmu
which can be used to remove components from additional mapunits and non-representative data mapunits; thanks to Nathan Roe- Convert UTF-8 strings in
us_ss_timeline
result to ASCII SDA_query()
: Fixed POST request that could produce unhandled errors on network failure (now returnstry-error
like other error-causing code)SDA_query()
: In the event of a syntax error, error contents are now returned as a message, not a warning.uncode()
andcode()
now work withdata.table
andtibble
objects.- Various fixes to tests and error handling code to reduce likelihood of thrown errors from network problems or missing suggested packages.
soilDB 2.7.0
soilDB 2.7.0 (2022-05-18)
- Spatial
- Dropped imports from
sp
andraster
which meanssoilDB
no longer requires the soon-to-retirergdal
package. - All spatial data processing has been moved to
sf
andterra
, which have been added to Suggests.- (breaking change) Classes from these packages (e.g.
sf
,SpatRaster
) will be returned by default rather thanSpatial*DataFrame
orRasterLayer
fromsp
andraster
. - (breaking change) Spatial functions that take spatial input will return the same class type as the input unless otherwise specified.
fetchSDA_spatial()
andSDA_spatialQuery()
gainas_Spatial
argument; whenTRUE
equivalent (backward compatible)sp
andraster
data types are returned.- Alternately, you may set
options(soilDB.return_Spatial=TRUE)
- (breaking change) Classes from these packages (e.g.
mukey.wcs()
andISSR800.wcs()
bug fix for some instances where the target extent was miscalculated, resulting in slight differences from requested resolution (res
argument) of result.mukey.wcs()
gains a new possible data sourcedb="RSS"
which accesses a Web Coverage Service containing grids from Raster Soil Surveys in the United States.- See: #229 for more details on what has changed.
- Dropped imports from
- NASIS
- (breaking change)
rmHzErrors
argument now defaults toFALSE
. Please let us know if allowing horizon errors results in unexpected behavior so we can repair various interfaces that rely on no errors being present. Seeaqp::checkHzDepthLogic()
for more information on the types of things that used to result in profiles being removed from results and for guidelines on how to fix. - Added several new columns from the
plotplantinventory
table toget_vegplot_species_from_NASIS_db()
result; thanks to Zachary Van Abbema for suggestion and feedback - Local NASIS metadata used for
uncode()
are now cached within an R session which results in faster query processing times for users with a local NASIS database connection set up.- The
db
argument touncode()
has been deprecated. Now,code()
anduncode()
can useChoiceName
and/orChoiceLabel
in coding and decodingChoiceValue
for all data sources.
- The
- Rock fragment and artifact sieving now uses <76mm as the upper boundary for gravel fraction, and a related QC message has been removed
- (breaking change)
- SSURGO / Soil Data Access
- Added
get_SDA_cosurfmorph()
: a new function in "SSURGO On Demand" style. Users can customize the WHERE clause, target tables and the grouping variable used to calculate proportions (defaultby="compname"
)- "cosurfmorphgc" summarizes "geomposmntn", "geomposhill", "geomposflats", "geompostrce"
- "cosurfmorphhpp" summarizes "hillslopeprof"
- "cosurfmorphss" summarizes "shapeacross", "shapedown", and concatenated "surfaceshape"
- Several fixes for logic of
get_SDA_property()
withmethod="weighted average"
andinclude_minors=TRUE
/miscellaneous_areas=TRUE
, thanks to Andy Paolucci and Dylan Beaudette for testing and providing feedback on the queries. - All
get_SDA_*()
methods (exceptget_SDA_metrics()
) now support input of customWHERE
clause in lieu ofmukeys
/areasymbols
arguments and gain adsn
argument for specifying a local SQLite database or DBIConnection. - Added
downloadSSURGO()
for downloading/extraction of the SSURGO data by survey area from Web Soil Survey. - Added
createSSURGO()
for building of local databases as SQLite/Geopackage from one or more SSURGO exports.- Exports can be obtained via
downloadSSURGO()
, from NASIS or downloaded from other sources such as https://datagateway.nrcs.usda.gov/GDGHome_DirectDownLoad.aspx.
- Exports can be obtained via
- Added
What's Changed
- Use terra/sf to replace raster/sp/rgdal by @brownag in #229
- Add
get_SDA_cosurfmorph()
by @brownag in #245 - downloadSSURGO & createSSURGO: download WSS ZIP archives by soil survey area and create local databases (SQLite/SpatiaLite/Geopackage) by @brownag in #244
- Add get_SSURGO_utils.R by @brownag in #247
get_SDA_*()
: Local SDA-style queries by @brownag in #246
Full Changelog: 2.6.15...2.7.0
soilDB 2.6.15
soilDB 2.6.15 (2022-04-13)
fetchNASIS()
- New
mixColors
argument used to toggle color mixing for pedon horizons with multiple colors per moisture state.- Default
TRUE
mixes colors based on reported color percentage viaestimateColorMixture()
.FALSE
returns the dominant color in each moisture state, or first record for cases withoutcolorpct
populated.
- Default
- Added
taxreaction
andtaxfamhahatmatcl
to extended taxonomic information - Added new option (
soilDB.NASIS.skip_uncode
) to bypassuncode()
in NASIS functions (mostly used for debugging or special database instances that come pre-decoded) - An instance in
fetchNASIS(from="components")
where local database connection was left open was fixed
- New
- Added
fetchLDM()
function to access Kellogg Soil Survey Lab Data Mart via Soil Data Access or local SQLite snapshot (#243) - Added
get_SDA_metrics()
for accessing usage metrics for Soil Data Access, Web Soil Survey and the Lab Data Mart. Thanks to Jason Nemecek for submitting the base SQL query get_SDA_interpretation(method = "dominant condition")
now includestotal_comppct_*
columns reflecting the summed component percentage of the dominant condition- Updated metadata for SCAN sites that were missing
pedlabsampnum
(KSSL Pedon Sample ID)
CRAN Release 2.6.14
soilDB 2.6.14 (2022-03-15)
waterYearDay()
bug fix for more specific (sub-daily) date-time formatsfetchSCAN()
better handling of empty results in multi-site queries- Updates to queries, metadata and sample datasets for NASIS 7.4.1 Database Model
fetchNASIS("pedons")
no longer includespmweathering
fetchNASIS("components")
no longer includesecositeorigin
- New Component Ecological Site attributes added
stringsAsFactors
argument to soilDB functions has been deprecated in favor of a package option- Default behavior for NASIS domains is to return character labels rather than coded factors
- Use
NASISDomainsAsFactor(TRUE)
to toggle package optionsoilDB.NASIS.DomainsAsFactor
CRAN Release 2.6.13
soilDB 2.6.13 (2022-01-29)
fetchSDA_spatial
now supportsby.col
"areaname"
,"mlraoffice"
, and"mouagencyresp"
; thanks to suggestion by Jay SkovlinfetchNASIS
fix for multiple site observation records with surface fragments; thanks to bug report from Brianna WegnerwaterYearDay()
use format and timezone for start date conversionfetchNASIS
fix forfrom="components", SS=FALSE
and queries where no NASIS local database is present (e.g. from SQLite source)- Update to
NASIS_table_column_keys
dataset of NASIS primary and foreign keys by table name to include many more tables fetchVegdata()
no longer errors for child table queries unless site/site observation/vegetation plot records are missingfetchOSD(extended=TRUE)
now returns an element"NCCPI"
containing the National Commodity Crop Production Index summaries. The values returned are quantiles at the 1, 5, 25, 50, 75, 95, and 99% levels over all SSURGO components withcompname
matchingseries
for irrigated and non-irrigated condition.
CRAN Release 2.6.12
soilDB 2.6.12 (2022-01-07)
get_SDA_property()
now works with mixed component and horizon-level properties; thanks to Matthieu Stigler for the bug report- Added
get_SDV_legend_elements()
for fetching and parsing XML for Soil Data Viewer / Web Soil Survey-style symbol themes for soil interpretations from Soil Data Access fetchNASIS()
pedon and component geomorphic summaries now include columns for landscape, microfeature, microrelief, 2D/3D morphometry, and slope shapefetchNASIS('pedons')
now usessimplifyFragmentData()
for surface fragments
soilDB 2.6.11 (2021-12-21)
fetchSDA()
handle NULL component-level results with an informative errorfetchSDA()
now (again) returns mapunit/legend-level information viaget_mapunit_from_NASIS()
createStaticNASIS()
and queries to SQLite NASIS snapshots now preserve date/time using RSQLite 2.2.4+ viaextended_types=TRUE
argument todbConnect()
get_soilseries_from_NASIS()
now returnssoiltaxclasslastupdated
as a date/time and stores the year in calculated columnsoiltaxclassyearlastupdated
- Added several tables to thematic groups in
get_NASIS_table_name_by_purpose()
fetchOSD()
gains surface shape proportions in extendedshape_across
andshape_down
tablesSDA_spatialQuery()
what='mukey'
now works withdb='STATSGO'
- Added metadata to
loafercreek
,gopheridge
andmineralKing
waterYearDay()
pass throughformat
argument for POSIX time conversion