Skip to content

Releases: ncss-tech/soilDB

CRAN Release 2.6.10

15 Dec 01:25
Compare
Choose a tag to compare

soilDB 2.6.10 (2021-12-14)

  • waterDayYear() and .formatDates() allow optional format and tz argument; used for consistent POSIX time conversion in tests where date/time has granularity finer than one day
  • fetchSDA() extensions for better handling of components with no horizon data
  • SDA_spatialQuery() and processSDA_WKT() fully use {sf}, replacing {sp} in these contexts
  • SDA_spatialQuery() gains argument byFeature to use multiple single-feature queries and combine the results with a unique feature ID specified by idcol 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 the dsn argument is specified.
  • Rebuilt loafercreek, gopheridge and mineralKing from latest fetchNASIS() results.

CRAN Release 2.6.9

03 Dec 23:25
Compare
Choose a tag to compare

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(): added query_string argument
  • get_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 aggregation
  • fetchNASIS("components") now "sieves" rock fragments and human artifacts using same routines as for pedons; respects nullFragsAreZero argument
  • fetchKSSL(..., returnGeochemicalData = TRUE) safely returns 0-length data.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 needed
  • fetchSCAN(): graceful handling of timeout and converted from {plyr} to {data.table}; (#161, #184)
  • get_EDIT_ecoclass_by_geoUnit(): graceful handling of timeout
  • get_SDA_muaggatt(): add query_string argument for parity with other "SSURGO on demand" / get_SDA_*() functions

soilDB 2.6.6 (2021-09-24)

  • get_SDA_pmgroupname() and get_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"

CRAN Release 2.6.5

21 Aug 22:00
Compare
Choose a tag to compare

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 supports fill=TRUE argument just like from="components" to include pedons that have no horizon records
  • createStaticNASIS(): column order should match NASIS, even if data types require reorder for ODBC driver
  • fetchSoilGrids() 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 and nitrogen (SoilGrids uncertainty layer always uses factor of 10 to create integers)
    • Improved error handling
    • Added progress and verbose arguments for text progress bar and additional message output
    • Added support for {sf} and {sp} POINT geometry inputs
  • 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

23 Jul 15:51
a06f8c4
Compare
Choose a tag to compare

soilDB 2.6.3 (2021-07-23)

  • SDA_query() and all functions that call SDA_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 using what="areasymbol" or what="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 = ...) and get_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 as TRUE 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 where majcompflag = 'Yes' in result
      • New default argument miscellaneous_areas=FALSE removes miscellaneous land types compkind values from result
      • Organic and bedrock layers are no longer removed from "Weighted Average", "MIN" or "MAX" aggregations
    • get_SDA_interpretation: added argument not_rated_value with default value of NA to set "not rated"" values across methods/queries. For backwards compatibility with original SQL use not_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
  • 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() and get_lmuaoverlap_from_NASIS() now works for "MLRA Survey Area" areatypename and no longer is limited by constraints on legendsuituse or mustatus

CRAN Release 2.6.2

16 May 16:48
Compare
Choose a tag to compare

soilDB 2.6.2 (2021-05-16)

  • Added formativeElement argument to taxaExtent() (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 NASIS pedon table; this value is calculated based on contents of petaxhistory child table
  • get_SDA_interpretation and get_SDA_property now support aggregation method="NONE" allowing for returning properties, classes and ratings for individual components or horizons (#181)
  • ISSR800.wcs and mukey.wcs now return a result that inherits from try-error (and a message) if the Web Coverage Service query fails

CRAN Release 2.6.1

19 Apr 00:09
Compare
Choose a tag to compare

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 and odbc, replacing RODBC
  • New methods dbConnectNASIS and dbQueryNASIS 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
  • 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 document
  • fetchNASIS(..., rmHzErrors=TRUE) -- spurious removals of data due to missing "extended" records. fetchNASIS now uses aqp::horizons<- after building a minimal SoilProfileCollection from NASIS site and horizon tables. This allows aqp integrity methods to trigger where needed--preventing unintentional re-ordering or removals of "valid" horizon data.

CRAN Release 2.5.9

26 Jan 19:11
Compare
Choose a tag to compare

soilDB 2.5.9 (2021-01-26)

  • HenryTimeLine moved to {sharpshootR} package
  • new functions mukey.wcs() and ISSR800.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 using geom.src = "sapolygon" with x as a vector of area symbols (areasymbol) or legend keys (lkey). For sapolygon results, the method and add.field arguments work the same as for mupolygon, only now both geometries can be returned with fields from the legend table.
  • fetchSDA_spatial now can return STATSGO gsmmupolygon geometry with db = "STATSGO"; these data are linked to mapunit and (national) legend just like mupolygon.

soilDB 2.5.8

21 Oct 18:16
Compare
Choose a tag to compare

Updates since last CRAN release on 2020-01-29.

soilDB manual

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 CONUS
  • SDA_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() and get_NOAA_stations_nearXY() for batch queries of NOAA Daily Climate Data (requires free API token)
  • bug fix for fetchSDA_spatial with chunk.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() and get_phfmp_from_NASIS_db() for fetching Pedon Horizon Concentrations and Field Measured Properties from NASIS local database

soilDB 2.5

29 Jan 03:23
Compare
Choose a tag to compare

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

05 Nov 17:14
Compare
Choose a tag to compare

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