Skip to content

Releases: ncss-tech/soilDB

soilDB 2.8.5

05 Nov 15:58
Compare
Choose a tag to compare

soilDB 2.8.5 (2024-11-04)

  • fetchLDM() add support for area_type argument with local database connections (dsn argument)
  • fetchSCAN() updates:
    • Improved SCAN, CSCAN, SNOTEL, SNOWLITE station metadata (#61) via @jskovlin
    • Timezone support for hourly data requested by fetchSCAN() (#184)
    • All above-ground sensors are now returned, instead of just the first of each type (#359)
  • Added new help file on NASIS database sources; see ?NASISLocalDatabase (#360)
  • get_SDA_*() function updates related to consistent parameters for miscellaneous areas and minor components (#361)
  • fetchSOLUS(): New function for downloading data from Soil Landscapes of the United States 100-meter (SOLUS100) soil property maps project repository (#362)
  • fetchNASIS() more consistent QC messages and output for multiple site observations and lab samples
  • Updated SoilProfileCollection data sets (loafercreek, gopheridge, mineralKing) for aqp 2.1.x object definition and recent changes to fetchNASIS() (#363)

What's Changed

Full Changelog: 2.8.4...2.8.5

soilDB 2.8.4

19 Aug 14:24
Compare
Choose a tag to compare

soilDB 2.8.4 (2024-08-19)

  • createSSURGO() bug fixes following changes in 2.8.3
    • generating gpkg_contents for GeoPackage files failed to add entries for "features" data_type
    • filename argument not properly handled in some cases
  • SDA_query() handle another possible failure point in error handling code
  • createStaticNASIS() use odbc::dbListFields() instead of odbc::odbcConnectionColumns()
  • fetchNASIS Vignette

Full Changelog: 2.8.3...2.8.4

soilDB 2.8.3

11 Jun 22:00
Compare
Choose a tag to compare

soilDB 2.8.3 (2024-06-11)

  • Updates to SoilWeb web coverage services
    • ISSR800 authoritative grid system altered slightly
    • ISSR800.wcs() and soilColor.wcs() now set color table internally when possible
    • updated source data: ISSR800 (FY24) and soil color (FY23)
  • SDA_query() updates
    • Better messaging on error
    • Handle try-error result more gracefully in high-level functions (#352)
  • createSSURGO(): added support for creating DuckDB, PostgreSQL, and other DBI-compatible databases (#352) via conn argument
  • fetchSDA() and get_chorizon_from_SDA() concatenate multiple texcl using a comma when a texture group contains multiple texture classes (e.g. stratified textures) (fixes #353)
  • fetchNASIS()/.formatLandformString(): append geomfmod column to landscape, landform, and microfeature strings where present; thanks to Gabriel Benitez for suggestion
  • fetchNASIS()/get_extended_data_from_NASIS_db(): fix conversion of codes to labels for microrelief
  • fetchSCAN(): fix header format; thanks to @dschlaep for reporting and providing a fix

What's Changed

  • SDA_query: handle API failures with more grace by @brownag in #351
  • createSSURGO: add support for creating DuckDB and other DBI-compatible databases by @brownag in #352
  • get_chorizon_from_SDA: concatenate many:1 texcl, lieutex within RV chtexturegrp by @brownag in #353

Full Changelog: 2.8.2...2.8.3

soilDB 2.8.2

23 Apr 00:10
Compare
Choose a tag to compare

soilDB 2.8.2 (2024-04-22)

  • SoilWeb Web Coverage Service MUKEY grid data source (used for mukey.wcs()) and metadata have been updated for FY2024
    • Note that ISSR800 WCS (ISSR800.wcs() source) is still using FY2023/FY2022 data
  • get_SDA_coecoclass() default data returned for methods "Dominant Component", "Dominant Condition" and "None" now include localphase column
  • get_soilseries_from_NASIS() and get_competing_soilseries_from_NASIS(): add SS argument for parity with all other NASIS "get" methods
    • default to FALSE for backward compatibility/common use cases
  • get_site_data_from_NASIS_db() gains Frost Free Days, MAP, REAP, MAAT, MAST, MSAT, MSST, MWAT, MWST, and Parent Material Group Name; thanks to Zach Van Abbema for suggestion
  • Changes in column names related to Area table / "areasymbol" (#272); thanks to Zach Van Abbema for suggestion
    • get_site_data_from_NASIS_db(): Add state, county, and MLRA areasymbol references ("site_state", "site_county", "site_mlra")
    • get_mapunit_from_NASIS_db(): Add dominant MLRA areasymbol reference column "lmapunit_mlra"
    • get_soilseries_from_NASIS(): replace areasymbol column to use relationship-style name "soilseries_typelocst" (minor breaking change)
  • fetchSDA_spatial(): Add support for querying mapunit point ("mupoint"), mapunit line ("muline"), special feature point ("featpoint"), special feature line ("featline") by mukey or featkey, geometry type selectable via geom.src argument
  • SDA_spatialQuery(): Add support for querying mapunit point ("mupoint"), mapunit line ("muline"), special feature point ("featpoint"), special feature line ("featline") for a spatial extent, geometry type selectable via what argument
  • simplifyFragmentData() / simplifyArtifactData() efficiency improvement when all records are missing data

What's Changed

  • Update and refactor SDA_spatialQuery() by @brownag in #344
  • fetchSDA_spatial: Implement geom.src "mupoint", "muline", "featpoint" and "featline" support by @brownag in #345
  • SDA_spatialQuery: implement what 'mupoint', 'muline', 'featpoint', 'featline' by @brownag in #346

Full Changelog: 2.8.1...2.8.2

soilDB 2.8.1

09 Jan 23:59
Compare
Choose a tag to compare

soilDB 2.8.1 (2024-01-09)

  • get_mapunit_from_NASIS(), get_lmuaoverlap_from_NASIS() and get_legend_from_NASIS() gain areatypename argument used for filtering legends by areatypename.
    • Default results include "Non-MLRA Soil Survey Area" and "MLRA Soil Survey Area". Set to NULL for no filter.
  • Fixed bugs in waterDayYear() and summarizeSoilTemperature() for leap years (#333)
  • fetchSoilGrids() upgrades
    • Fixed a bug with data.frame output
    • Requests for more than 5 sites now include a call to Sys.sleep() to conform with ISRIC "Fair Use" policy
    • Upgraded SoilProfileCollection spatial promotion for aqp 2.0+
    • Added 10 kPa, 33 kPa and 1500 kPa water content estimates to default variable sets for point and grid queries
  • fetchSDA_spatial() gains ability to query mapunit delineations by Ecological Site ID (by.col="ecoclassid")
  • get_SDA_coecoclass() default ecoclasstypename is now c("NRCS Rangeland Site", "NRCS Forestland Site"), as this is the most common type of aggregation and is least prone to producing unusual composition-related errors due to duplications
    • Fixed bug related to merging tables/integer data type
    • Fixed bug in calculation of "Not assigned" fraction of mapunits which could result in negative aggregate component percentages below the default threshold

What's Changed

Full Changelog: 2.8.0...2.8.1

soilDB 2.8.0

22 Dec 06:27
c3e224c
Compare
Choose a tag to compare

soilDB 2.8.0 (2023-12-22)

  • Minimum {aqp} version set to v2.0.2. This is due to changes in the namespace related to aqp::col2Munsell(), to "encourage" users to update to the more efficient routines provided in {aqp} 2+ (if they haven't already), and prepare for future updates in the 2.x series.
  • Fix bugs in get_SDA_interpretation() when dsn refers to a local SQLite source and in concatenation of reason string when wide_reason=TRUE. Thanks to Kevin Wolz (@kevinwolz)
  • createSSURGO() updates:
    • Breaking change: Now uses the standard SSURGO layer names for spatial data (e.g. "mupolygon" rather than "soilmu_a").
    • Creates indices for foreign keys and other columns important for data analysis, dramatically improving the performance of standard queries on SQLite sources.
    • Now works properly on STATSGO data sets for individual states or CONUS. Previously tabular data would be transferred but spatial data were not.
  • downloadSSURGO() gains db argument which gives ability to download STATSGO by state or all of US from Web Soil Survey. Thanks to Meghan Krueger for suggestion.
  • get_SDA_property(): weighted average/dominant component numeric methods now return mukey in first column position; for parity with other get_SDA* methods recently updated/already doing this, making it easier to use these columns for raster attribute tables via terra::set.levels()
  • fetchNASIS(lab=TRUE) fixed a bug when multiple phlabresults records are present for a single horizon, but one or both is missing bottom depth. Thanks to Meyer Bohn (@MollicMeyer) for reporting.
  • SoilProfileCollection objects now include a time stamp in their metadata, accessed as: metadata(x)$created (#235)
  • Added area_type argument to fetchLDM() for non-SSA area queries (#328)
  • Added grid argument to fetchSoilGrids() for downloading Cloud-Optimized GeoTIFF subsets for spatial extent (#329)
  • fetchOSD() now automatically batches requests into sets of 100 series, allowing arbitrarily large requests to be made (#239)

What's Changed

  • Testing new aqp::col2Munsell() replacing aqp::rgb2munsell() by @dylanbeaudette in #325
  • soilDB v2.8.0 by @brownag in #327
  • fetchLDM: add area_type argument for non-SSA area queries by @brownag in #328
  • fetchSoilGrids: add grid argument for downloading COG subsets for extent by @brownag in #329

Full Changelog: 2.7.10...2.8.0

soilDB 2.7.10

16 Nov 19:19
Compare
Choose a tag to compare

soilDB 2.7.10 (2023-11-16)

  • fetchSDA_spatial() gains geom.src="mlrapolygon" for obtaining Major Land Resource Area (MLRA) polygon boundaries. When using this geometry source x is a vector of MLRARSYM (MLRA Symbols).

    • The geometry source is the MLRA Geographic Database v5.2 (2022) which is not (yet) part of Soil Data Access. Instead of SDA, GDAL utilities are used to read a zipped ESRI Shapefile from a remote URL: https://www.nrcs.usda.gov/sites/default/files/2022-10/MLRA_52_2022.zip. Therefore, most additional fetchSDA_spatial() arguments are not currently supported for the MLRA geometry source. In the future a mlrapolygon table may be added to SDA (analogous to mupolygon and sapolygon), and the function will be updated accordingly at that time.
  • Web coverage services and related raster attribute tables provided by SoilWeb (mukey.wcs() etc.) are now using the SoilWeb load-balancer URL

  • get_SDA_coecoclass() gains method="all" for aggregating information about ecological sites and related components. The method performs a condition-based aggregation for each ecological site condition in the map unit, producing a "wide" data.frame result with as many columns as needed to portray all site conditions.

  • fetchLDM() gains new argument WHERE for supplying a custom SQL where clause for selecting sites of interest. For example: fetchLDM(WHERE = "CASE WHEN corr_name IS NOT NULL THEN LOWER(corr_name) ELSE LOWER(samp_name) END = 'musick'")

soilDB 2.7.9 (2023-09-01)

  • Added new method options for fetchSDA_spatial(). Aggregation grouping is controlled by the by.col argument. This works for mapunit and survey area polygon geometries, aggregating all polygons in the group for each mukey, nationalmusym, lkey, or areasymbol extent.
  • method="extent" method calculates a bounding rectangle
  • method="convexhull" calculates the convex hull
  • method="union" returns a MULTIPOLYGON
  • method="collection" returns a GEOMETRYCOLLECTION

Bug Fixes

  • Bug fix for get_vegplot_transpoints_from_NASIS_db(); using wrong record ID for transect points

  • get_NASIS_table_name_by_purpose() now includes "pointplantcoverdetails", "plantprodquadratdetails" in the "vegetation" table purpose group

What's Changed

  • fetchSDA_spatial: add new T-SQL aggregate geometry methods by @brownag in #299
  • fetchSDA_spatial: add geom.src='mlrapolygon' by @brownag in #302
  • get_SDA_interpretation(): add subrule ratings to "reason" field by @brownag in #308
  • mukey.wcs(): fix areas containing all NoData and resolution for AOI at edge of WCS extent by @brownag in #306
  • get_SDA_coecoclass: add method="all" by @brownag in #301
  • alignment of WCS results with authoritative grid topology by @brownag in #313

Full Changelog: 2.7.8...2.7.10

soilDB 2.7.8

29 Aug 13:56
Compare
Choose a tag to compare

soilDB 2.7.8 (2023-08-29)

  • Added new SoilWeb "Web Coverage Service" vignette (https://ncss-tech.github.io/soilDB/articles/wcs-ssurgo.html) related to creating thematic maps using grids of mapunit keys from SoilWeb with aggregated tabular data from Soil Data Access.

  • get_SDA_*() functions now all return mukey values in first column

  • mukey.wcs() gains a 30m gridded version of Hawaii and Puerto Rico SSURGO data via db="HI_SSURGO" and db="PR_SSURGO", respectively.

  • get_vegplot_data_from_NASIS_db(): now uses LEFT join to plant table so that empty records can be diagnosed; thanks to @natearoe for suggestion

  • Added new NASIS query functions for vegetation transect point and quadrat details: get_vegplot_prodquadrats_from_NASIS_db() and get_vegplot_transpoints_from_NASIS_db(); thanks to Zach Van Abbema for suggestion

Bug Fixes

  • get_SDA_property(method="Dominant Component (Numeric)") now includes minors by default, fixing issues with STATSGO mapunits that have no major components flagged. (@dylanbeaudette)

  • get_component_data_from_NASIS_db(): removed duplicated hydricrating column, also now includes climate columns with standard names. This is a continuation of the idea that custom aliases for standard NASIS columns are deprecated (#242)

  • .pickBestEcosite() now considers record_when_last_updated in lieu of correlation date; this stabilizes sort order from SQLite snapshot v.s. NASIS local database sources (#295)

  • get_component_from_GDB(): fixes for batching over component geomorphic description and parent material group @smroecker

  • get_mapunit_from_SDA(): handle possibility of mapunit-level SDA query failure

What's Changed

Full Changelog: 2.7.7...2.7.8

soilDB 2.7.7

11 Mar 00:34
658118d
Compare
Choose a tag to compare

soilDB 2.7.7 (2023-03-10)

Enhancements

  • fetchNASIS(from="pedons") and get_site_data_from_NASIS_db() now return siteobsiid column (@natearoe)

  • mukey.wcs() gains experimental gridded STATSGO layer (300m)

  • Add get_NASIS_table_metadata() for returning information about columns in NASIS tables.

  • simplifyFragment/ArtifactData(): downgrade warnings

  • get_cosoilmoist_from_SDA(): mukey and cokey now included when duplicates=TRUE; thanks to @andypaolucci for catching this

  • fetchSoilGrids()

    • Add SpatVector coercion for input locations (already supported sf/sp classes)

    • Add handling for messages from API about erroneous input

  • Add fetchNASIS("pedons") columns vignette

  • Add get_NASIS_table_metadata() and optional argument include_description for get_NASIS_metadata() and get_NASIS_column_metadata()

  • get_SDA_cosurfmorph() + get_SDA_pmgroupname(): support for including or excluding misc. areas via miscellaneous_areas argument

  • get_site_data_from_NASIS_db():

    • Omit "multiple horizontal datums" warning

    • Remove calculated X/Y long/lat + add proper NASIS alias for long/lat

    • Add siteothvegclass id/name - add tables to default lookup/site sets

Bug fixes

  • dbQueryNASIS(..., close=TRUE) now calls dbDisconnect() on.exit() (ensuring connections get closed on error)

  • fetchSCAN():

    • 2x requests when timeseries argument not specified

    • Account for no results (e.g. year = 1800)

    • Bug fix in vectorization when daily + hourly data requested

  • downloadSSURGO():

    • Handle SDA_query() with invalid syntax in WHERE clause

    • Fix for include_template=FALSE

  • createSSURGO()

    • Attribute tables are now added to gpkg_contents when output filename is a GeoPackage
  • Fix for .get_comonth_from_SDA()

  • Fix selected set (SS argument) for get_ecosite_history_from_NASIS_db() in get_site_data_from_NASIS_db()

  • get_SDA_pmgroupname: return NA (not "NULL") for empty/missing pmgroupname when simplify=TRUE

  • SDA_spatialQuery():

    • geomIntersection=TRUE with db="SAPOLYGON" now correctly labels the areasymbol column (previously was mukey) to match geomIntersection=FALSE and SDA schema

    • Bounding box extent polygons are now only calculated for SpatRaster (not SpatVector) input

What's Changed

  • get_site_data_from_NASIS_db: Add siteothvegclass id/name by @brownag in #280
  • Improving support for get_SDA*() component filters by @brownag in #259
  • Table and Column Metadata by @brownag in #278
  • Add get_ecosite_history_from_NASIS_db() by @brownag in #281
  • createSSURGO: add minimal gpkg_contents entries for attribute tables by @brownag in #283

Full Changelog: 2.7.6...2.7.7

soilDB 2.7.6

03 Dec 19:46
Compare
Choose a tag to compare

soilDB 2.7.6

  • All references to soilDB.env have been replaced with a function that returns that environment object (get_soilDB_env()); thanks to @MollicMeyer for identifying this as a problem in #277. This object used to be exported but was unintentionally omitted from NAMESPACE; this has been fixed.

  • fetchNASIS(lab=TRUE) bug fix related to many:1 relationships between lab samples and morphologic horizons with all-missing columns having logical datatype (#277)

  • Added get_SRI() and fetchSRI() functions for accessing USFS Region 6 Soil Resource Inventory information from https://ecoshare.info/; thanks to @joshualerickson for the contribution (#274)

  • fetchLDM() now sets the horizon designation metadata like other fetch* functions that return SoilProfileCollection objects (@dylanbeaudette)

  • mukey.wcs() fix spurious warnings occasionally given due to minor differences (rounding) of grid dimensions

  • {curl} has been moved from Suggests to Imports

  • simplfyFragmentData() alias for simplifyFragmentData() removed (@infotroph)

What's Changed

New Contributors

Full Changelog: 2.7.5...2.7.6