Releases: ncss-tech/soilDB
CRAN Release 2.6.10
soilDB 2.6.10 (2021-12-14)
waterDayYear()
and.formatDates()
allow optionalformat
andtz
argument; used for consistent POSIX time conversion in tests where date/time has granularity finer than one dayfetchSDA()
extensions for better handling of components with no horizon dataSDA_spatialQuery()
andprocessSDA_WKT()
fully use {sf}, replacing {sp} in these contextsSDA_spatialQuery()
gains argumentbyFeature
to use multiple single-feature queries and combine the results with a unique feature ID specified byidcol
argument. This allows for specific feature intersection results without secondary spatial overlay of the polygons (#222)dbConnectNASIS()
no longer requires that the NASIS credentials option be set if thedsn
argument is specified.- Rebuilt
loafercreek
,gopheridge
andmineralKing
from latestfetchNASIS()
results.
CRAN Release 2.6.9
soilDB 2.6.9 (2021-12-03)
- Replaced functionality using {plyr}/{reshape2} with {base}/{data.table}
processSDA_WKT()
: replaced {rgeos} with {wk} and {sf}SDA_spatialQuery()
: addedquery_string
argumentget_SDA_property()
: fixes for MIN/MAX aggregation (#219)get_component_from_SDA()
: fragment size thresholds now conform with new (clarified) NSSH definitions
soilDB 2.6.8 (2021-11-05)
fetchNASIS()
upgrades: use data.table and base internally for data aggregationfetchNASIS("components")
now "sieves" rock fragments and human artifacts using same routines as for pedons; respectsnullFragsAreZero
argumentfetchKSSL(..., returnGeochemicalData = TRUE)
safely returns 0-lengthdata.frame
when no data available
soilDB 2.6.7 (2021-10-27)
- Removed several packages from Suggests: {gridExtra}, {ggplot2}, {viridisLite}, {mapview}, {rasterVis}
get_OSD()
: Handle "NA" and type conversion for JSON results an convert spaces to underscores for file names as neededfetchSCAN()
: graceful handling of timeout and converted from {plyr} to {data.table}; (#161, #184)get_EDIT_ecoclass_by_geoUnit()
: graceful handling of timeoutget_SDA_muaggatt()
: addquery_string
argument for parity with other "SSURGO on demand" /get_SDA_*()
functions
soilDB 2.6.6 (2021-09-24)
get_SDA_pmgroupname()
andget_SDA_hydric()
now support alternate aggregation methods.- Default for
get_SDA_pmgroupname()
is"dominant component"
, now also supports"dominant condition"
and"none"
. - Default for
get_SDA_hydric()
is a map unit level aggregation of components and assigns new classes ; now supports"dominant component"
,"dominant condition"
and"none"
- Default for
CRAN Release 2.6.5
soilDB 2.6.5 (CRAN: 2021-08-21)
- API calls that return geometry in projected coordinates (AEA/NAD83) now use ESPG:5070 instead of EPSG:6350
soilDB 2.6.4 (unreleased; 2021-08-06)
fetchNASIS(from="pedons")
now supportsfill=TRUE
argument just likefrom="components"
to include pedons that have no horizon recordscreateStaticNASIS()
: column order should match NASIS, even if data types require reorder for ODBC driverfetchSoilGrids()
bug fixes, updates to metadata and references in documentation (#201)- Corrected the conversion factor used for predicted
nitrogen
values (conversion from cg/kg to g/kg) - Corrected the conversion factor used for uncertainty in
bdod
andnitrogen
(SoilGrids uncertainty layer always uses factor of 10 to create integers) - Improved error handling
- Added
progress
andverbose
arguments for text progress bar and additional message output - Added support for {sf} and {sp} POINT geometry inputs
- Corrected the conversion factor used for predicted
- Add
get_SDA_coecoclass()
SOD-style method for mapunit/component level summaries of ecological site and other vegetation class information
CRAN Release 2.6.3
soilDB 2.6.3 (2021-07-23)
SDA_query()
and all functions that callSDA_query()
get proper column class handling (related to #190), however:- be careful with the use of CAST(): unknown datatypes may not be correctly interpreted
- previous column classes that were incorrectly guessed by
type.convert()
may have changed (e.g.component.wei
)
SDA_spatialQuery()
can now be used to return soil survey area symbols or geometry usingwhat="areasymbol"
orwhat="sapolygon"
, respectively- Added new columns to soil classification ("SC") table result of
get_soilseries_from_NASIS()
; now including taxonomic mineralogy class which may contain multiple parts for series with strongly contrasting control sections - Updates to
get_SDA_*()
methods- Extends
get_SDA_property(property = ...)
andget_SDA_interpretation(rulename = ...)
vectorization over property/rulename to work with any aggregation method.- Now supports: Dominant Condition, Min, Max, Dominant Component, Weighted Average
- Add
query_string
argument (default:FALSE
). Set asTRUE
to skip submitting query to SDA, instead returning a string of the query that would have been sent instead of data.frame result get_SDA_property
: better handling of NULL, miscellaneous areas, and property-specific weighting- Remove
ISNULL(x, 0)
logic that affected weighted averages in presence of missing data - Conditional calculation of horizon weights considering NULL values for requested properties (unique weights for each property)
- New default argument
include_minors=FALSE
includes only components wheremajcompflag = 'Yes'
in result - New default argument
miscellaneous_areas=FALSE
removes miscellaneous land typescompkind
values from result - Organic and bedrock layers are no longer removed from "Weighted Average", "MIN" or "MAX" aggregations
- Remove
get_SDA_interpretation
: added argument not_rated_value with default value ofNA
to set "not rated"" values across methods/queries. For backwards compatibility with original SQL usenot_rated_value = 99.0
- Standardizing MUKEY column name (and other keys) as lowercase in results
- More informative error messages for bad input / arguments inconsistent with specified method
- Extends
- Thanks to @hammerly who pointed out weighted averaging of NASIS
phlabresults
wasn't working as expected and for highlighting some more improvements (#192) get_OSD()
TXT and HTML formats now supported (in addition to JSON) through a common function interface- Added
get_NASIS_table_key_by_name()
get_NASIS_fkey_by_name()
,get_NASIS_pkeyref_by_name()
,get_NASIS_pkey_by_name()
,get_NASIS_table_name_by_purpose()
methods for helping get information on primary/foreign keys and thematic groups of NASIS tables (useful for creating SQLite/external snapshots of NASIS tables) get_mapunit_from_NASIS()
,get_legend_from_NASIS()
andget_lmuaoverlap_from_NASIS()
now works for "MLRA Survey Area"areatypename
and no longer is limited by constraints onlegendsuituse
ormustatus
CRAN Release 2.6.2
soilDB 2.6.2 (2021-05-16)
- Added
formativeElement
argument totaxaExtent()
(SoilWeb taxon extent function)- "Formative elements" are derived from the dictionary provided by the {SoilTaxonomy} package (https://cran.r-project.org/package=SoilTaxonomy)
- For example:
taxaExtent("abruptic", level = 'subgroup', formativeElement = TRUE)
will get an 800m grid (for SSURGO data in CONUS) showing extent of taxa that have "abruptic" in subgroup-level taxon name
fetchNASIS(from="pedons")
result now contains the"taxclname"
(full family-level taxon name) field from the NASISpedon
table; this value is calculated based on contents ofpetaxhistory
child tableget_SDA_interpretation
andget_SDA_property
now support aggregationmethod="NONE"
allowing for returning properties, classes and ratings for individual components or horizons (#181)ISSR800.wcs
andmukey.wcs
now return a result that inherits fromtry-error
(and a message) if the Web Coverage Service query fails
CRAN Release 2.6.1
This marks the acceptance of CRAN Release 2.6.1 (submitted 0c2085c, which is too old to be tagged in this release).
Updates by patch version since last CRAN release.
soilDB 2.6.1 (2021-04-07)
- Connections to local NASIS and various MS Access databases now use
DBI
andodbc
, replacingRODBC
- New methods
dbConnectNASIS
anddbQueryNASIS
for NASIS access with read-only credentials, fetching query results, and closing the DBIConnection upon completion - NASIS methods use
dsn
argument to specify a local "static" SQLite file containing NASIS tables, or custom DBIConnection to a database with NASIS schema- Default
dsn = NULL
uses"nasis_local"
ODBC connection to local NASIS SQL Server
- Default
- Horizon depth logic checking is now done with
aqp::checkHzDepthLogic()
, powered by {data.table} - Added several new SDA query methods based on https://github.com/ncss-tech/ssurgoOnDemand by @jneme910 and @cferguso:
get_SDA_property
,get_SDA_interpretation
,get_SDA_muaggatt
,get_SDA_hydric
,get_SDA_pmgroupname
soilDB 2.6.0 (2021-02-18)
OSDquery
gets a new argument (everything
) for searching the entire documentfetchNASIS(..., rmHzErrors=TRUE)
-- spurious removals of data due to missing "extended" records.fetchNASIS
now usesaqp::horizons<-
after building a minimalSoilProfileCollection
from NASIS site and horizon tables. This allowsaqp
integrity methods to trigger where needed--preventing unintentional re-ordering or removals of "valid" horizon data.
CRAN Release 2.5.9
soilDB 2.5.9 (2021-01-26)
HenryTimeLine
moved to {sharpshootR} package- new functions
mukey.wcs()
andISSR800.wcs()
for hitting web coverage service (WCS) for gSSURGO, gNATSGO, and ISSR-800 grids - new function
ROSETTA()
for accessing the new ROSETTA model API (c/o Todd Skaggs, USDA-ARS) fetchOSD(..., extended=TRUE)
gains geographically associated soils, parsed from OSD (thanks AGB)fetchSDA_spatial
now can return soil survey area polygons usinggeom.src = "sapolygon"
withx
as a vector of area symbols (areasymbol
) or legend keys (lkey
). Forsapolygon
results, themethod
andadd.field
arguments work the same as formupolygon
, only now both geometries can be returned with fields from thelegend
table.fetchSDA_spatial
now can return STATSGOgsmmupolygon
geometry withdb = "STATSGO"
; these data are linked tomapunit
and (national)legend
just likemupolygon
.
soilDB 2.5.8
Updates since last CRAN release on 2020-01-29.
soilDB 2.5.8 (2020-10-20)
fetchNASIS
/soilDB:::.rockFragmentSieve
now uses fragment RV,soilDB:::.sieve
uses<
operator (#1)fetchKSSL(..., returnMorphologicData=TRUE)
now returns redoximorphic features by horizon- new function
taxaExtent
returns 800m gridded taxonomic grids for CONUS seriesExtent
can now return 800m gridded series extents for CONUSSDA_spatialQuery
can now retrieve SSURGO and STATSGO geometry c/o dschlaep (#141)- new import: data.table; beginning to implement data.table-aware methods
soilDB 2.5.7 (2020-09-03)
- add
fetchGDB
for querying tabular data from SSURGO/gNATSGO/STATSGO File Geodatabases - add
get_NOAA_GHCND()
andget_NOAA_stations_nearXY()
for batch queries of NOAA Daily Climate Data (requires free API token) - bug fix for
fetchSDA_spatial
withchunk.size > 1
resulting in duplicate data in result - major improvements to
fetchSDA_spatial
to handle queries that exceed JSON Serialization Limit - add
fetchSoilGrids
for point data queries to SoilGrids v2 API with SoilProfileCollection output
soilDB 2.5.6 (2020-06-16)
- bug fixes in
fetchKSSL
related to vectorization, all arguments vectorized except for bbox KSSL_VG_model
output cleaned-up, now returns phi -> theta function
soilDB 2.5.3 (2020-03-22)
fetchKSSL
is now fully vectorized and builds on new SoilWeb JSON API
soilDB 2.5.2 (2020-02-05)
- add
get_concentrations_from_NASIS_db()
andget_phfmp_from_NASIS_db()
for fetching Pedon Horizon Concentrations and Field Measured Properties from NASIS local database
soilDB 2.5
soilDB 2.5
This is a release of soilDB with new functionality and documentation, updates to conform with aqp 1.19, as well as bug-fixes and other quality-of-life enhancements.
Notably: we are back on CRAN. Tests and examples have been altered to minimize likelihood of failure on CRAN check farm machines, which has been an on-going issue. By making tests that contact remote APIs skip if missing the nasis_local
ODBC connection, we can effectively filter tests to run only on the local (work) machine.
Recent Changes
soilDB 2.5 (2020-01-23)
- CRAN release
- simplifyColorData and mix_and_clean_colors always use CIELAB colorspace for weighted averages, and best-available metric for transformation to Munsell notation
- fetchSDA_spatial - new fetch function that simplifies getting spatial data associated with a vector of mukey or nationalmusym. The function has options for customizing result attribute table and is designed to automatically use makeChunks() to prevent timeout on large queries.
- aqp::test_hz_logic is now deprecated -- refactored affected fetch functions
soilDB 2.4.3 (2020-01-07)
- surface water depth added to fetchNASIS_pedons()
- fetchNASIS() has @restrictions set automaticlly if data are populated
- new function for accessing pedon RMF in local NASIS DB: get_RMF_from_NASIS_db()
soilDB 2.4.1
This is a maintenance release of soilDB
addressing bug-fixes, small enhancements, and documentation gaps. Dependencies have been reduced by moving some packages from IMPORTS to SUGGESTS.
Recent Changes
soilDB 2.3.9 (2019-07-25)
- SDA_query() no longer writes temporary files, c/o suggestion from Kyle Bocinsky (#106 / #108)
- fetchOSD() gets a sanity check to protect against going over GET request limits
- makeChunks() added to util functions, useful for splitting data before sending API calls
soilDB 2.3.8 (2019-03-22)
- loafercreek, gopheridge, and mineralking sample data have been updated with valid place-holder in @sp
- bug fix for SDA_query() related to multi-line records (#28)
soilDB 2.3.7 (2019-03-12)
- sharpshootR added to SUGGESTS
- fetchHenry() and fetchSCAN() now include water year/day (Oct 1 -- Sep 30)
- HenryTimeLine() convenience function added
- bug fix in fetchOSD(..., extended=TRUE) when no climate data available
- bug fix in SDA_query()
soilDB 2.3.6 (2019-02-12)
- simplifyFragmentData() and related functions now 4-5x faster
- fetchOSD() now returns metadata when extended=TRUE