diff --git a/docs/authors.html b/docs/authors.html index 3dffbe05..4a02dee8 100644 --- a/docs/authors.html +++ b/docs/authors.html @@ -115,7 +115,7 @@

Authors

diff --git a/docs/index.html b/docs/index.html index cd61d7eb..ca7c930b 100644 --- a/docs/index.html +++ b/docs/index.html @@ -241,10 +241,10 @@

License

Developers

diff --git a/docs/news/index.html b/docs/news/index.html index a4df9928..c42a3409 100644 --- a/docs/news/index.html +++ b/docs/news/index.html @@ -114,24 +114,36 @@

Changelog

Source: NEWS.md -
-

-soilDB 2.5.7 (2020-09-04) Unreleased +
+

+soilDB 2.5.8 (2020-10-20) 2020-10-21

+
+
+

+soilDB 2.5.7 (2020-09-03) Unreleased +

+
  • add fetchGDB for querying tabular data from SSURGO/gNATSGO/STATSGO File Geodatabases
  • -
  • add fetchSoilGrids for point data queries to SoilGrids v2 API with SoilProfileCollection output
  • add get_NOAA_GHCND() and get_NOAA_stations_nearXY() for batch queries of NOAA Daily Climate Data (requires free API token)
  • -
  • bugfix for fetchSDA_spatial with chunk.size > 1 resulting in duplicate data in result
  • +
  • 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
  • -
  • new import: data.table; beginning to implement data.table-aware methods in aqp and soilDB -
  • +
  • add fetchSoilGrids for point data queries to SoilGrids v2 API with SoilProfileCollection output
  • +
  • +fetchKSSL(..., returnGeochemicalData=TRUE) now returns geochemical, optical and XRD/thermal data
@@ -167,7 +179,7 @@

soilDB 2.5.1 (2020-01-29) Unreleased

@@ -193,7 +205,7 @@

  • surface water depth added to fetchNASIS_pedons()
  • -fetchNASIS() has @restrictions set automaticlly if data are populated
  • +fetchNASIS() has @restrictions set automatically if data are populated
  • new function for accessing pedon RMF in local NASIS DB: get_RMF_from_NASIS_db()
  • @@ -373,7 +385,7 @@

    soilDB 2.0-3 (2018-02-13) Unreleased

    @@ -381,7 +393,7 @@

    soilDB 2.0-2 (2018-01-29) Unreleased

    @@ -520,7 +532,7 @@

    soilDB 1.6.9 (2015-12-28) Unreleased

    @@ -545,7 +557,7 @@

    soilDB 1.6.5 (2015-12-03) Unreleased

    @@ -582,7 +594,7 @@

    @@ -704,7 +716,7 @@

    @@ -903,7 +915,7 @@

    soilDB 0.5-6 (2012-04-16) Unreleased

    @@ -915,7 +927,7 @@

  • fetchNASIS() and fetchPedonPC() now integrate `extended’ data
  • warning and error messages cleaned-up
  • multiple textures no longer cause duplicate HZ rows (NASIS only)
  • -
  • exteded queries now split frags/para-frags
  • +
  • extended queries now split frags/para-frags
  • silt fraction is estimated from 100-(sand+clay) when possible
  • added local NASIS ODBC connection vignette (thanks JMS)
  • removed dsn argument from NASIS functions as it should always be ‘nasis_local’
  • diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml index 81a1e627..5c09f14e 100644 --- a/docs/pkgdown.yml +++ b/docs/pkgdown.yml @@ -2,5 +2,5 @@ pandoc: 2.7.2 pkgdown: 1.6.1 pkgdown_sha: ~ articles: {} -last_built: 2020-09-25T17:48Z +last_built: 2020-10-21T17:38Z diff --git a/docs/reference/KSSL_VG_model.html b/docs/reference/KSSL_VG_model.html index c5f9121f..838e4bf1 100644 --- a/docs/reference/KSSL_VG_model.html +++ b/docs/reference/KSSL_VG_model.html @@ -148,8 +148,8 @@

    Details

    This function was developed to work with measured or estimated parameters of the van Genuchten model, as generated by the Rosetta model. As such, VG_params should have the following format and conventions:

    theta_r

    saturated water content, values should be in the range of {0, 1}

    theta_s

    residual water content, values should be in the range of {0, 1}

    -
    alpha

    related to the inverse of the air entry suction, function expects log10-tranformed values with units of cm

    -
    npar

    index of pore size distribution, function expects log10-tranformed values with units of 1/cm

    +
    alpha

    related to the inverse of the air entry suction, function expects log10-transformed values with units of cm

    +
    npar

    index of pore size distribution, function expects log10-transformed values with units of 1/cm

    diff --git a/docs/reference/OSDquery-1.png b/docs/reference/OSDquery-1.png index b0d1dd64..39acc01c 100644 Binary files a/docs/reference/OSDquery-1.png and b/docs/reference/OSDquery-1.png differ diff --git a/docs/reference/OSDquery.html b/docs/reference/OSDquery.html index af4c3523..2709a92f 100644 --- a/docs/reference/OSDquery.html +++ b/docs/reference/OSDquery.html @@ -40,7 +40,7 @@ - + @@ -117,7 +117,7 @@

    Full text searching of the USDA-NRCS Official Series Descriptions

    -

    This is a rough example of how chunks of text parsed from OSD records can be made search-able with the PostgreSQL fulltext indexing and query system (syntax details). Each search field (except for the "brief narrative" and MLRA) corresponds with a section header in an OSD. The results may not include every OSD due to formatting errors and typos. Results are scored based on the number of times search terms match words in associated sections. This is a programatic interface to this webpage.

    +

    This is a rough example of how chunks of text parsed from OSD records can be made search-able with the PostgreSQL fulltext indexing and query system (syntax details). Each search field (except for the "brief narrative" and MLRA) corresponds with a section header in an OSD. The results may not include every OSD due to formatting errors and typos. Results are scored based on the number of times search terms match words in associated sections. This is the R API corresponding to this webpage.

    OSDquery(mlra='', taxonomic_class='', typical_pedon='', 
    @@ -129,7 +129,7 @@ 

    Arg mlra -

    a comma-delimeted list of MLRA to search

    +

    a comma-delimited list of MLRA to search

    taxonomic_class @@ -161,7 +161,7 @@

    Arg geog_assoc_soils -

    search geographicaly associated soils section

    +

    search geographically associated soils section

    @@ -193,9 +193,7 @@

    Value

    a data.frame object containing soil series names that match patterns supplied as arguments.

    References

    - - -

    http://www.nrcs.usda.gov/wps/portal/nrcs/detailfull/soils/home/?cid=nrcs142p2_053587

    +

    https://www.nrcs.usda.gov/wps/portal/nrcs/detailfull/soils/home/?cid=nrcs142p2_053587

    Author

    D.E. Beaudette

    @@ -222,7 +220,7 @@

    Examp par(mar=c(0,0,1,1)) plot(x$SPC) } -
    # } +
    # }

    -

    Submit a query to the Soil Data Acccess (SDA) REST/JSON web-service and return the results as a data.frame. There is a 100,000 record limit and 32Mb JSON serializer limit, per query. Queries should contain a WHERE statement or JOIN condition to limit the number of rows affected / returned. Consider wrapping calls to SDA_query in a function that can iterate over logical chunks (e.g. areasymbol, mukey, cokey, etc.). The function makeChunks can help with such iteration.

    +

    Submit a query to the Soil Data Access (SDA) REST/JSON web-service and return the results as a data.frame. There is a 100,000 record limit and 32Mb JSON serializer limit, per query. Queries should contain a WHERE statement or JOIN condition to limit the number of rows affected / returned. Consider wrapping calls to SDA_query in a function that can iterate over logical chunks (e.g. areasymbol, mukey, cokey, etc.). The function makeChunks can help with such iteration.

    SDA_query(q)
    @@ -136,7 +136,7 @@

    Value

    a data.frame result (NULL if empty, try-error on error)

    Details

    -

    The SDA website can be found at http://sdmdataaccess.nrcs.usda.gov and query examples can be found at http://sdmdataaccess.nrcs.usda.gov/QueryHelp.aspx. A library of query examples can be found at https://nasis.sc.egov.usda.gov/NasisReportsWebSite/limsreport.aspx?report_name=SDA-SQL_Library_Home.

    +

    The SDA website can be found at https://sdmdataaccess.nrcs.usda.gov and query examples can be found at https://sdmdataaccess.nrcs.usda.gov/QueryHelp.aspx. A library of query examples can be found at https://nasis.sc.egov.usda.gov/NasisReportsWebSite/limsreport.aspx?report_name=SDA-SQL_Library_Home.

    SSURGO (detailed soil survey) and STATSGO (generalized soil survey) data are stored together within SDA. This means that queries that don't specify an area symbol may result in a mixture of SSURGO and STATSGO records. See the examples below and the SDA Tutorial for details.

    Note

    diff --git a/docs/reference/SDA_spatialQuery-1.png b/docs/reference/SDA_spatialQuery-1.png index b271bd5b..746bd55d 100644 Binary files a/docs/reference/SDA_spatialQuery-1.png and b/docs/reference/SDA_spatialQuery-1.png differ diff --git a/docs/reference/SDA_spatialQuery-2.png b/docs/reference/SDA_spatialQuery-2.png index 213f7ff4..d792510b 100644 Binary files a/docs/reference/SDA_spatialQuery-2.png and b/docs/reference/SDA_spatialQuery-2.png differ diff --git a/docs/reference/SDA_spatialQuery-3.png b/docs/reference/SDA_spatialQuery-3.png index 1fe9f9f8..3f855a74 100644 Binary files a/docs/reference/SDA_spatialQuery-3.png and b/docs/reference/SDA_spatialQuery-3.png differ diff --git a/docs/reference/SDA_spatialQuery.html b/docs/reference/SDA_spatialQuery.html index b7ed3615..da56f767 100644 --- a/docs/reference/SDA_spatialQuery.html +++ b/docs/reference/SDA_spatialQuery.html @@ -40,7 +40,7 @@ - + @@ -117,7 +117,7 @@

    SDA Spatial Query

    -

    Query SDA (SSURGO / STATSGO) records via spatial intersection with supplied geometries. Input can be SpatialPoints, SpatialLines, or SpatialPolygons objects with a valid CRS. Map unit keys, overlapping polygons, or the spatial intersectionion of geom + SSURGO / STATSGO polygons can be returned. See details.

    +

    Query SDA (SSURGO / STATSGO) records via spatial intersection with supplied geometries. Input can be SpatialPoints, SpatialLines, or SpatialPolygons objects with a valid CRS. Map unit keys, overlapping polygons, or the spatial intersection of geom + SSURGO / STATSGO polygons can be returned. See details.

    SDA_spatialQuery(
    @@ -136,7 +136,7 @@ 

    Arg what -

    a character vector specifting what to return. 'mukey': data.frame with intersecting map unit keys and names, geom overlapping or intersecting map unit polygons

    +

    a character vector specifying what to return. 'mukey': data.frame with intersecting map unit keys and names, geom overlapping or intersecting map unit polygons

    geomIntersection @@ -157,7 +157,7 @@

    Details

    Queries for map unit keys are always more efficient vs. queries for overlapping or intersecting (i.e. least efficient) features. geom is converted to GCS / WGS84 as needed. Map unit keys are always returned when using what = "geom".

    There is a 100,000 record limit and 32Mb JSON serializer limit, per query.

    -

    SSURGO (detailed soil survey, typicall 1:24,000 scale) and STATSGO (generalized soil survey, 1:250,000 scale) data are stored together within SDA. This means that queries that don't specify an area symbol may result in a mixture of SSURGO and STATSGO records. See the examples below and the SDA Tutorial for details.

    +

    SSURGO (detailed soil survey, typically 1:24,000 scale) and STATSGO (generalized soil survey, 1:250,000 scale) data are stored together within SDA. This means that queries that don't specify an area symbol may result in a mixture of SSURGO and STATSGO records. See the examples below and the SDA Tutorial for details.

    Note

    Row-order is not preserved across features in geom and returned object. Use sp::over() or similar functionality to extract from results. Polygon area in acres is computed server-side when what = 'geom' and geomIntersection = TRUE.

    @@ -254,14 +254,13 @@

    Examp plot(statsgo.geom, lwd = 2, border = 'firebrick', add = TRUE) plot(bbox.sp, lwd = 3, add = TRUE) legend( - x = 'top', + x = 'topright', legend = c('BBOX', 'STATSGO', 'SSURGO'), lwd = c(3, 2, 1), col = c('black', 'firebrick', 'royalblue'), - horiz = TRUE, - bty = 'n' ) + # quick reminder that STATSGO map units often contain many components # format an SQL IN statement using the first STATSGO mukey mu.is <- format_SQL_in_statement(statsgo.geom$mukey[1]) @@ -304,7 +303,7 @@

    Examp font = 4 ) } -
    #> Warning: CRS object has comment, which is lost in output
    #> Warning: CRS object has comment, which is lost in output
    #> single result set, returning a data.frame
    #> single result set, returning a data.frame
    #> single result set, returning a data.frame
    #> single result set, returning a data.frame
    #> single result set, returning a data.frame
    #> single result set, returning a data.frame
    #> empty result set
    #> single result set, returning a data.frame
    #> converting profile IDs from integer to character
    #> converting horizon IDs in column `chkey` to character
    #> Warning: CRS object has comment, which is lost in output
    #> Warning: CRS object has comment, which is lost in output
    #> Warning: CRS object has comment, which is lost in output
    #> Warning: CRS object has comment, which is lost in output
    #> Warning: duplicates is set to FALSE and 'mukey' is in WHERE clause. Note: 'mukey' omitted from result.
    #> single result set, returning a data.frame
    #> single result set, returning a data.frame
    #> single result set, returning a data.frame
    #> empty result set
    #> single result set, returning a data.frame
    #> single result set, returning a data.frame
    #> empty result set
    #> single result set, returning a data.frame
    #> converting profile IDs from integer to character
    #> converting horizon IDs in column `chkey` to character
    # } +
    #> Warning: CRS object has comment, which is lost in output
    #> Warning: CRS object has comment, which is lost in output
    #> single result set, returning a data.frame
    #> single result set, returning a data.frame
    #> single result set, returning a data.frame
    #> single result set, returning a data.frame
    #> single result set, returning a data.frame
    #> single result set, returning a data.frame
    #> empty result set
    #> single result set, returning a data.frame
    #> converting profile IDs from integer to character
    #> converting horizon IDs in column `chkey` to character
    #> Warning: CRS object has comment, which is lost in output
    #> Warning: CRS object has comment, which is lost in output
    #> Warning: CRS object has comment, which is lost in output
    #> Warning: CRS object has comment, which is lost in output
    #> Warning: duplicates is set to FALSE and 'mukey' is in WHERE clause. Note: 'mukey' omitted from result.
    #> single result set, returning a data.frame
    #> single result set, returning a data.frame
    #> single result set, returning a data.frame
    #> empty result set
    #> single result set, returning a data.frame
    #> single result set, returning a data.frame
    #> empty result set
    #> single result set, returning a data.frame
    #> converting profile IDs from integer to character
    #> converting horizon IDs in column `chkey` to character
    # }

    diff --git a/docs/reference/SSURGO_spatial_query.html b/docs/reference/SSURGO_spatial_query.html index 465c878f..b687f029 100644 --- a/docs/reference/SSURGO_spatial_query.html +++ b/docs/reference/SSURGO_spatial_query.html @@ -145,7 +145,7 @@

    Arg

    Note

    -

    This function should be considered experimental; arguments, results, and side-effects could change at any time. SDA now supports spatial queries, consider using SDA_query_features instead.

    +

    This function should be considered experimental; arguments, results, and side-effects could change at any time. SDA now supports spatial queries, consider using SDA_query_features instead.

    Details

    Data are currently available from SoilWeb. These data are a snapshot of the "official" data. The snapshot date is encoded in the "soilweb_last_update" column in the function return value. Planned updates to this function will include a switch to determine the data source: "official" data via USDA-NRCS servers, or a "snapshot" via SoilWeb.

    @@ -168,7 +168,7 @@

    Examp SoilWeb_spatial_query(coords=c(-121, 38)) }
    #> ogc_fid areasymbol musym mukey soilweb_last_update dist_meters -#> 1 1484974 ca077 220 462112 2020-05-29 92.17456302
    # } +#> 1 1485651 ca077 220 462112 2020-05-29 92.17456302
    # }
    #> Loading required package: ggplot2
    #> Loading required package: gridExtra
    #> Loading required namespace: rvest
    #> getting project 'EVAL - MLRA 111A - Ross silt loam, 0 to 2 percent slopes, frequently flooded' from NasisReportsWebSite
    #> converting profile IDs from integer to character
    #> converting horizon IDs in column `chiid` to character
    #> Warning: Removed 49 row(s) containing missing values (geom_path).
    #> Warning: Removed 49 row(s) containing missing values (geom_path).
    #> Warning: Removed 49 row(s) containing missing values (geom_path).
    #> Warning: Removed 49 row(s) containing missing values (geom_path).
    #> Warning: NAs introduced by coercion
    #> Warning: NAs introduced by coercion
    #> Warning: NAs introduced by coercion
    #> Warning: NAs introduced by coercion
    #> Warning: NAs introduced by coercion
    #> Warning: Use of `x$depb_r` is discouraged. Use `depb_r` instead.
    #> Warning: NAs introduced by coercion
    #> Warning: NAs introduced by coercion
    #> Warning: NAs introduced by coercion
    #> Warning: Removed 119 rows containing missing values (geom_rect).
    #> Warning: Removed 119 row(s) containing missing values (geom_path).
    #> Warning: Removed 119 rows containing missing values (geom_point).
    #> Warning: no non-missing arguments to max; returning -Inf
    #> Warning: no non-missing arguments to max; returning -Inf
    #> Warning: no non-missing arguments to max; returning -Inf
    #> Warning: no non-missing arguments to max; returning -Inf
    #> Warning: no non-missing arguments to max; returning -Inf
    #> Warning: Position guide is perpendicular to the intended axis. Did you mean to specify a different guide `position`?
    #> Warning: Position guide is perpendicular to the intended axis. Did you mean to specify a different guide `position`?
    #> Warning: Position guide is perpendicular to the intended axis. Did you mean to specify a different guide `position`?
    #> Warning: Position guide is perpendicular to the intended axis. Did you mean to specify a different guide `position`?
    #> Warning: Position guide is perpendicular to the intended axis. Did you mean to specify a different guide `position`?
    +
    #> Loading required package: ggplot2
    #> Loading required package: gridExtra
    #> +#> Attaching package: 'gridExtra'
    #> The following object is masked from 'package:aqp': +#> +#> combine
    #> Loading required namespace: rvest
    #> getting project 'EVAL - MLRA 111A - Ross silt loam, 0 to 2 percent slopes, frequently flooded' from NasisReportsWebSite
    #> converting profile IDs from integer to character
    #> converting horizon IDs in column `chiid` to character
    #> Warning: Removed 49 row(s) containing missing values (geom_path).
    #> Warning: Removed 49 row(s) containing missing values (geom_path).
    #> Warning: Removed 49 row(s) containing missing values (geom_path).
    #> Warning: Removed 49 row(s) containing missing values (geom_path).
    #> Warning: NAs introduced by coercion
    #> Warning: NAs introduced by coercion
    #> Warning: NAs introduced by coercion
    #> Warning: NAs introduced by coercion
    #> Warning: NAs introduced by coercion
    #> Warning: Use of `x$depb_r` is discouraged. Use `depb_r` instead.
    #> Warning: NAs introduced by coercion
    #> Warning: NAs introduced by coercion
    #> Warning: NAs introduced by coercion
    #> Warning: Removed 119 rows containing missing values (geom_rect).
    #> Warning: Removed 119 row(s) containing missing values (geom_path).
    #> Warning: Removed 119 rows containing missing values (geom_point).
    #> Warning: no non-missing arguments to max; returning -Inf
    #> Warning: no non-missing arguments to max; returning -Inf
    #> Warning: no non-missing arguments to max; returning -Inf
    #> Warning: no non-missing arguments to max; returning -Inf
    #> Warning: no non-missing arguments to max; returning -Inf
    #> Warning: Position guide is perpendicular to the intended axis. Did you mean to specify a different guide `position`?
    #> Warning: Position guide is perpendicular to the intended axis. Did you mean to specify a different guide `position`?
    #> Warning: Position guide is perpendicular to the intended axis. Did you mean to specify a different guide `position`?
    #> Warning: Position guide is perpendicular to the intended axis. Did you mean to specify a different guide `position`?
    #> Warning: Position guide is perpendicular to the intended axis. Did you mean to specify a different guide `position`?
    # } diff --git a/docs/reference/fetchOSD-1.png b/docs/reference/fetchOSD-1.png index 3f714a09..57a652c8 100644 Binary files a/docs/reference/fetchOSD-1.png and b/docs/reference/fetchOSD-1.png differ diff --git a/docs/reference/fetchOSD-2.png b/docs/reference/fetchOSD-2.png index 68386fa2..b771c54c 100644 Binary files a/docs/reference/fetchOSD-2.png and b/docs/reference/fetchOSD-2.png differ diff --git a/docs/reference/fetchOSD.html b/docs/reference/fetchOSD.html index 13bcd197..6ba02c92 100644 --- a/docs/reference/fetchOSD.html +++ b/docs/reference/fetchOSD.html @@ -6,7 +6,7 @@ -Fetch Data by Soil Series Name — fetchOSD • soilDB +Fetch Official Series Descriptions and summaries from SoilWeb API — fetchOSD • soilDB @@ -39,8 +39,8 @@ - - + + @@ -111,23 +111,23 @@
    -

    This functions fetches a varity of data associated with named soil series, extracted from the USDA-NRCS Official Series Description text files and detailed soil survey (SSURGO). These data are periodically updated and made available via SoilWeb.

    +

    This function fetches a variety of data associated with named soil series, extracted from the USDA-NRCS Official Series Description text files and detailed soil survey (SSURGO). These data are periodically updated and made available via SoilWeb.

    -
    fetchOSD(soils, colorState = 'moist', extended=FALSE)
    +
    fetchOSD(soils, colorState = "moist", extended = FALSE)

    Arguments

    - + @@ -139,95 +139,70 @@

    Arg

    soils

    a character vector of named soil series, case insensitive

    a character vector of named soil series; case-insensitive

    colorState
    -

    Details

    +

    Value

    - +

    a SoilProfileCollection object containing basic soil morphology and taxonomic information.

    +

    Details

    -

    Related documentation can be found in the following tutorials

      -
    • overview of all soil series query functions

    • +

      - - -

      The standard set of "site" and "horizon" data are returned as a SoilProfileCollection object (extended=FALSE. The "extended" suite of summary data can be requested by setting extended=TRUE. The resulting object will be a list with the following elements:)

      -
      -
      SPC

      SoilProfileCollection containing standards "site" and "horizon" data

      -
      competing

      competing soil series from the SC database snapshot

      -
      geomcomp

      empirical probabilities for geomorphic component, derrived from the current SSURGO snapshot

      -
      hillpos

      empirical probabilities for hillslope position, derrived from the current SSURGO snapshot

      -
      mtnpos

      empirical probabilities for mountain slope position, derrived from the current SSURGO snapshot

      -
      terrace

      empirical probabilities for river terrace position, derrived from the current SSURGO snapshot

      -
      flats

      empirical probabilities for flat landscapes, derrived from the current SSURGO snapshot

      -
      pmkind

      empirical probabilities for parent material kind, derrived from the current SSURGO snapshot

      -
      pmorigin

      empirical probabilities for parent material origin, derrived from the current SSURGO snapshot

      -
      mlra

      empirical MLRA membership values, derrived from the current SSURGO snapshot

      -
      climate

      experimental climate summaries from PRISM stack

      -
      metadata

      metadata associated with SoilWeb cached summaries

      - -
      - - -

      When using `extended=TRUE`, there are a couple of scenarios in which series morphology contained in `SPC` do not fully match records in the associated series summaries (e.g. `competing`).

      -
      -
      A query for soil series that exist entirely outside of CONUS (e.g. PALAU).

      Climate summaries are empty data.frames becuase these summaries are currently generated from PRISM. We are working on a solution.

      - -
      A query for data within CONUS, but OSD morphology missing due to parsing error (e.g. formatting, typos).

      Extended summaries are present but morphology missing from `SPC`. A warning is issued.

      - -
      A query for multiple soil series, with one more more listed as "inactive" (e.g. BREADSPRINGS).

      Extended summaries are present but morphology missing from `SPC`. A warning is issued.

      - - -
      - -

      These last two cases are problematic for analysis that makes use of morphology and extended data, such as outlined in this tutorial on competing soil series.

      -

      Value

      - -

      a SoilProfileCollection object containing basic soil morphology and taxonomic information.

      +
    The standard set of "site" and "horizon" data are returned as a SoilProfileCollection object (extended=FALSE. The "extended" suite of summary data can be requested by setting extended=TRUE. The resulting object will be a list with the following elements:)
    +
    SPC

    SoilProfileCollection containing standards "site" and "horizon" data

    +
    competing

    competing soil series from the SC database snapshot

    +
    geomcomp

    empirical probabilities for geomorphic component, derived from the current SSURGO snapshot

    +
    hillpos

    empirical probabilities for hillslope position, derived from the current SSURGO snapshot

    +
    mtnpos

    empirical probabilities for mountain slope position, derived from the current SSURGO snapshot

    +
    terrace

    empirical probabilities for river terrace position, derived from the current SSURGO snapshot

    +
    flats

    empirical probabilities for flat landscapes, derived from the current SSURGO snapshot

    +
    pmkind

    empirical probabilities for parent material kind, derived from the current SSURGO snapshot

    +
    pmorigin

    empirical probabilities for parent material origin, derived from the current SSURGO snapshot

    +
    mlra

    empirical MLRA membership values, derived from the current SSURGO snapshot

    +
    climate

    experimental climate summaries from PRISM stack

    +
    metadata

    metadata associated with SoilWeb cached summaries

    When using `extended=TRUE`, there are a couple of scenarios in which series morphology contained in `SPC` do not fully match records in the associated series summaries (e.g. `competing`).
    1. A query for soil series that exist entirely outside of CONUS (e.g. PALAU).

    - Climate summaries are empty data.frames because these summaries are currently generated from PRISM. We are working on a solution.

    2. A query for data within CONUS, but OSD morphology missing due to parsing error (e.g. formatting, typos).

    - Extended summaries are present but morphology missing from `SPC`. A warning is issued.

    3. A query for multiple soil series, with one more more listed as "inactive" (e.g. BREADSPRINGS).

    - Extended summaries are present but morphology missing from `SPC`. A warning is issued.

    These last two cases are problematic for analysis that makes use of morphology and extended data, such as outlined in this tutorial on competing soil series.

    References

    -

    USDA-NRCS OSD search tools: http://www.nrcs.usda.gov/wps/portal/nrcs/detailfull/soils/home/?cid=nrcs142p2_053587

    -

    Author

    - -

    D.E. Beaudette

    -

    Note

    - -

    SoilWeb maintains a snapshot of the Official Series Description data. Please use the link above for the live data.

    +

    USDA-NRCS OSD search tools: https://www.nrcs.usda.gov/wps/portal/nrcs/detailfull/soils/home/?cid=nrcs142p2_053587

    See also

    +

    Author

    + +

    D.E. Beaudette

    Examples

    # \donttest{ if(requireNamespace("curl") & - curl::has_internet()) { - - # soils of interest - s.list <- c('musick', 'cecil', 'drummer', 'amador', 'pentz', - 'reiff', 'san joaquin', 'montpellier', 'grangeville', 'pollasky', 'ramona') - - # fetch and convert data into an SPC - s.moist <- fetchOSD(s.list, colorState='moist') - s.dry <- fetchOSD(s.list, colorState='dry') - - # plot profiles - # moist soil colors - if(require("aqp")) { + curl::has_internet()) { + + # soils of interest + s.list <- c('musick', 'cecil', 'drummer', 'amador', 'pentz', + 'reiff', 'san joaquin', 'montpellier', 'grangeville', 'pollasky', 'ramona') + + # fetch and convert data into an SPC + s.moist <- fetchOSD(s.list, colorState='moist') + s.dry <- fetchOSD(s.list, colorState='dry') + + # plot profiles + # moist soil colors + if(require("aqp")) { - par(mar=c(0,0,0,0), mfrow=c(2,1)) - plot(s.moist, name='hzname', - cex.names=0.85, axis.line.offset=-4) - plot(s.dry, name='hzname', - cex.names=0.85, axis.line.offset=-4) + par(mar=c(0,0,0,0), mfrow=c(2,1)) + plot(s.moist, name='hzname', + cex.names=0.85, axis.line.offset=-4) + plot(s.dry, name='hzname', + cex.names=0.85, axis.line.offset=-4) - # extended mode: return a list with SPC + summary tables - x <- fetchOSD(s.list, extended = TRUE, colorState = 'dry') + # extended mode: return a list with SPC + summary tables + x <- fetchOSD(s.list, extended = TRUE, colorState = 'dry') - par(mar=c(0,0,1,1)) - plot(x$SPC) - str(x, 1) - } + par(mar=c(0,0,1,1)) + plot(x$SPC) + str(x, 1) + } } -
    #> List of 13 +
    #> List of 13 #> $ SPC :Formal class 'SoilProfileCollection' [package "aqp"] with 9 slots #> $ competing :'data.frame': 84 obs. of 3 variables: #> $ geomcomp :'data.frame': 11 obs. of 9 variables: @@ -240,8 +215,8 @@

    Examp #> $ mlra :'data.frame': 52 obs. of 4 variables: #> $ climate.annual :'data.frame': 88 obs. of 12 variables: #> $ climate.monthly :'data.frame': 264 obs. of 14 variables: -#> $ soilweb.metadata:'data.frame': 17 obs. of 2 variables:

    # } -
    +#> $ soilweb.metadata:'data.frame': 15 obs. of 2 variables:
    # } +
    # } +
    # }
    diff --git a/docs/reference/get_colors_from_NASIS_db.html b/docs/reference/get_colors_from_NASIS_db.html index 351a296f..c745a5c8 100644 --- a/docs/reference/get_colors_from_NASIS_db.html +++ b/docs/reference/get_colors_from_NASIS_db.html @@ -136,7 +136,7 @@

    Details

    This function currently works only on Windows.

    Value

    -

    A dataframe with the results.

    +

    A data.frame with the results.

    Author

    Jay M. Skovlin and Dylan E. Beaudette

    diff --git a/docs/reference/get_colors_from_pedon_db.html b/docs/reference/get_colors_from_pedon_db.html index 6cf92802..26e3fdbb 100644 --- a/docs/reference/get_colors_from_pedon_db.html +++ b/docs/reference/get_colors_from_pedon_db.html @@ -136,7 +136,7 @@

    Details

    This function currently works only on Windows.

    Value

    -

    A dataframe with the results.

    +

    A data.frame with the results.

    Author

    Dylan E. Beaudette and Jay M. Skovlin

    diff --git a/docs/reference/get_comonth_from_NASIS_db.html b/docs/reference/get_comonth_from_NASIS_db.html index d62beb22..6789762d 100644 --- a/docs/reference/get_comonth_from_NASIS_db.html +++ b/docs/reference/get_comonth_from_NASIS_db.html @@ -163,20 +163,20 @@

    Examp # show structure of component month data str(cm) } -

    #> Loading required namespace: RODBC
    #> 'data.frame': 0 obs. of 13 variables: -#> $ coiid : int -#> $ month : Factor w/ 12 levels "Jan","Feb","Mar",..: -#> $ flodfreqcl : Factor w/ 7 levels "none","very rare",..: -#> $ floddurcl : Factor w/ 5 levels "Extremely brief (0.1 to 4 hours)",..: -#> $ pondfreqcl : Factor w/ 5 levels "none","rare",..: -#> $ ponddurcl : Factor w/ 4 levels "Very brief (4 to 48 hours)",..: -#> $ ponddep_l : int -#> $ ponddep_r : int -#> $ ponddep_h : int -#> $ dlyavgprecip_l: int -#> $ dlyavgprecip_r: int -#> $ dlyavgprecip_h: int -#> $ comonthiid : int
    # } +
    #> Loading required namespace: RODBC
    #> 'data.frame': 10452 obs. of 13 variables: +#> $ coiid : int 146851 146851 146851 146851 146851 146851 146851 146851 146851 146851 ... +#> $ month : Factor w/ 12 levels "Jan","Feb","Mar",..: 1 2 3 4 5 6 7 8 9 10 ... +#> $ flodfreqcl : Factor w/ 7 levels "none","very rare",..: 1 6 6 6 6 6 6 6 6 6 ... +#> $ floddurcl : Factor w/ 5 levels "Extremely brief (0.1 to 4 hours)",..: NA 3 3 3 3 3 3 3 3 3 ... +#> $ pondfreqcl : Factor w/ 5 levels "none","rare",..: 1 1 1 1 1 1 1 1 1 1 ... +#> $ ponddurcl : Factor w/ 4 levels "Very brief (4 to 48 hours)",..: NA NA NA NA NA NA NA NA NA NA ... +#> $ ponddep_l : int NA NA NA NA NA NA NA NA NA NA ... +#> $ ponddep_r : int NA NA NA NA NA NA NA NA NA NA ... +#> $ ponddep_h : int NA NA NA NA NA NA NA NA NA NA ... +#> $ dlyavgprecip_l: int NA NA NA NA NA NA NA NA NA NA ... +#> $ dlyavgprecip_r: int NA NA NA NA NA NA NA NA NA NA ... +#> $ dlyavgprecip_h: int NA NA NA NA NA NA NA NA NA NA ... +#> $ comonthiid : int 1653381 1653380 1653384 1653377 1653385 1653383 1653382 1653378 1653388 1653387 ...
    # }
    #> 'data.frame': 0 obs. of 57 variables: -#> $ dmudesc : chr -#> $ compname : chr -#> $ comppct_r : int -#> $ compkind : int -#> $ majcompflag : chr -#> $ localphase : chr -#> $ drainagecl : int -#> $ hydricrating : int -#> $ elev_l : num -#> $ elev_r : num -#> $ elev_h : num -#> $ slope_l : num -#> $ slope_r : num -#> $ slope_h : num -#> $ aspectccwise : int -#> $ aspectrep : int -#> $ aspectcwise : int -#> $ map_l : int -#> $ map_r : int -#> $ map_h : int -#> $ maat_l : num -#> $ maat_r : num -#> $ maat_h : num -#> $ mast_r : num -#> $ reannualprecip_r: int -#> $ ffd_l : int -#> $ ffd_r : int -#> $ ffd_h : int -#> $ tfact : int -#> $ wei : int -#> $ weg : int -#> $ nirrcapcl : int -#> $ nirrcapscl : int -#> $ nirrcapunit : int -#> $ irrcapcl : int -#> $ irrcapscl : int -#> $ irrcapunit : int -#> $ frostact : int -#> $ hydricrating.1 : int -#> $ hydgrp : int -#> $ corcon : int -#> $ corsteel : int -#> $ taxclname : chr -#> $ taxorder : int -#> $ taxsuborder : int -#> $ taxgrtgroup : int -#> $ taxsubgrp : int -#> $ taxpartsize : int -#> $ taxpartsizemod : int -#> $ taxceactcl : int -#> $ taxreaction : int -#> $ taxtempcl : int -#> $ taxmoistscl : int -#> $ taxtempregime : int -#> $ soiltaxedition : int -#> $ coiid : int -#> $ dmuiid : int
    # } +
    #> 'data.frame': 1131 obs. of 57 variables: +#> $ dmudesc : chr "025Cp" "025Cp" "025Cp" "025Fm" ... +#> $ compname : chr "Colo" "Nodaway" "Zook" "Fillmore" ... +#> $ comppct_r : int 50 45 5 99 1 100 100 100 95 4 ... +#> $ compkind : chr "series" "series" "series" "series" ... +#> $ majcompflag : int 1 1 0 1 0 1 1 1 1 0 ... +#> $ localphase : chr "frequently flooded" "frequently flooded" NA "frequently ponded" ... +#> $ drainagecl : chr "poorly" "moderately well" "poorly" "somewhat poorly" ... +#> $ hydricrating : chr "yes" "no" "yes" "yes" ... +#> $ elev_l : num 244 244 244 244 244 244 244 244 244 244 ... +#> $ elev_r : num 305 305 305 305 305 305 305 305 305 305 ... +#> $ elev_h : num 396 396 396 396 396 396 396 396 396 396 ... +#> $ slope_l : num 0 0 0 0 0 6 0 6 0 0 ... +#> $ slope_r : num 1 1 1 0 0 13 1 9 1 1 ... +#> $ slope_h : num 2 2 2 1 0 20 2 11 2 2 ... +#> $ aspectccwise : int 0 0 0 0 0 0 0 0 0 0 ... +#> $ aspectrep : int 135 135 135 135 135 135 135 135 135 135 ... +#> $ aspectcwise : int 359 359 359 359 359 359 359 359 359 359 ... +#> $ map_l : int 762 762 762 762 NA 762 762 762 762 762 ... +#> $ map_r : int 787 787 787 787 NA 787 787 787 787 787 ... +#> $ map_h : int 813 813 813 813 NA 813 813 813 813 813 ... +#> $ maat_l : num 11 11 11 11 NA 11 11 11 11 11 ... +#> $ maat_r : num 12 12 12 12 NA 12 12 12 12 12 ... +#> $ maat_h : num 13 13 13 13 NA 13 13 13 13 13 ... +#> $ mast_r : num NA NA NA NA NA NA NA NA NA NA ... +#> $ reannualprecip_r: int NA NA NA NA NA NA NA NA NA NA ... +#> $ ffd_l : int 160 160 160 160 NA 160 160 160 160 160 ... +#> $ ffd_r : int 170 170 170 170 NA 170 170 170 170 170 ... +#> $ ffd_h : int 180 180 180 180 NA 180 180 180 180 180 ... +#> $ tfact : int 5 5 5 3 5 1 5 5 5 5 ... +#> $ wei : chr "48" "48" "86" "48" ... +#> $ weg : chr "6" "6" "4" "6" ... +#> $ nirrcapcl : chr "3" "3" "2" "4" ... +#> $ nirrcapscl : chr "w" "w" "w" "w" ... +#> $ nirrcapunit : int NA NA NA NA NA NA NA NA NA NA ... +#> $ irrcapcl : chr NA NA NA "4" ... +#> $ irrcapscl : chr NA NA NA "w" ... +#> $ irrcapunit : int NA NA NA NA NA NA NA NA NA NA ... +#> $ frostact : chr "high" "high" "high" "high" ... +#> $ hydricrating.1 : int 1 2 1 1 1 2 2 2 2 1 ... +#> $ hydgrp : chr "c/d" "b" "c/d" "d" ... +#> $ corcon : chr "moderate" "low" "moderate" "moderate" ... +#> $ corsteel : chr "high" "high" "high" "high" ... +#> $ taxclname : chr "Fine-silty, mixed, mesic Cumulic Endoaquolls" "Fine-silty, mixed, superactive, nonacid, mesic Mollic Udifluvents" "Fine, smectitic, mesic Cumulic Vertic Endoaquolls" "Fine, smectitic, mesic Typic Argialbolls" ... +#> $ taxorder : chr "mollisols" "entisols" "mollisols" "mollisols" ... +#> $ taxsuborder : chr "aquolls" "fluvents" "aquolls" "albolls" ... +#> $ taxgrtgroup : chr "endoaquolls" "udifluvents" "endoaquolls" "argialbolls" ... +#> $ taxsubgrp : chr "cumulic endoaquolls" "mollic udifluvents" "cumulic vertic endoaquolls" "typic argialbolls" ... +#> $ taxpartsize : chr "fine-silty" "fine-silty" "fine" "fine" ... +#> $ taxpartsizemod : chr NA NA NA NA ... +#> $ taxceactcl : chr NA "superactive" NA NA ... +#> $ taxreaction : chr "not used" "nonacid" "not used" "not used" ... +#> $ taxtempcl : chr "mesic" "mesic" "mesic" "mesic" ... +#> $ taxmoistscl : chr NA NA NA NA ... +#> $ taxtempregime : chr "mesic" "mesic" "mesic" "mesic" ... +#> $ soiltaxedition : chr NA NA NA NA ... +#> $ coiid : int 146851 146852 146853 146854 1464912 146858 146860 146870 146883 146885 ... +#> $ dmuiid : int 69416 69416 69416 69417 69417 69420 69422 69430 69439 69439 ...
    # }
    #> [1] dmuiid coiid compname comppct_r drainagecl -#> [6] month flodfreqcl floddurcl pondfreqcl ponddurcl -#> [11] cosoilmoistiid dept_l dept_r dept_h depb_l -#> [16] depb_r depb_h status -#> <0 rows> (or 0-length row.names)
    # }
    +
    #> Warning: NAs introduced by coercion
    #> Warning: NAs introduced by coercion
    #> dmuiid coiid compname comppct_r drainagecl month flodfreqcl floddurcl +#> 1 69416 146851 Colo 50 poorly jan Not populated <NA> +#> 2 69416 146851 Colo 50 poorly jan Not populated <NA> +#> 3 69416 146851 Colo 50 poorly feb Not populated brief +#> 4 69416 146851 Colo 50 poorly feb Not populated brief +#> 5 69416 146851 Colo 50 poorly mar Not populated brief +#> 6 69416 146851 Colo 50 poorly mar Not populated brief +#> pondfreqcl ponddurcl cosoilmoistiid dept_l dept_r dept_h depb_l depb_r +#> 1 Not populated <NA> 276625 0 0 0 30 61 +#> 2 Not populated <NA> 4539792 0 23 46 183 183 +#> 3 Not populated <NA> 276623 0 0 0 30 61 +#> 4 Not populated <NA> 4539814 0 23 46 183 183 +#> 5 Not populated <NA> 276631 0 0 0 30 61 +#> 6 Not populated <NA> 4539815 0 23 46 183 183 +#> depb_h status +#> 1 91 <NA> +#> 2 183 <NA> +#> 3 91 <NA> +#> 4 183 <NA> +#> 5 91 <NA> +#> 6 183 <NA>
    # }
    -

    These functions return records from the Soil Classification database, either from the local NASIS datbase (all series) or via web report (named series only).

    +

    These functions return records from the Soil Classification database, either from the local NASIS database (all series) or via web report (named series only).

    get_soilseries_from_NASIS(stringsAsFactors = default.stringsAsFactors())
    diff --git a/docs/reference/get_veg_from_AK_Site.html b/docs/reference/get_veg_from_AK_Site.html
    index bf47692e..4e628e84 100644
    --- a/docs/reference/get_veg_from_AK_Site.html
    +++ b/docs/reference/get_veg_from_AK_Site.html
    @@ -133,7 +133,7 @@ 

    Arg

    Value

    -

    A dataframe with vegetation data in long format, linked to site ID.

    +

    A data.frame with vegetation data in long format, linked to site ID.

    Author

    Dylan E. Beaudette

    diff --git a/docs/reference/get_veg_from_MT_veg_db.html b/docs/reference/get_veg_from_MT_veg_db.html index dca8866f..68aeb092 100644 --- a/docs/reference/get_veg_from_MT_veg_db.html +++ b/docs/reference/get_veg_from_MT_veg_db.html @@ -136,7 +136,7 @@

    Details

    This function currently works only on Windows.

    Value

    -

    A dataframe.

    +

    A data.frame.

    Author

    Jay M. Skovlin

    diff --git a/docs/reference/get_veg_from_NPS_PLOTS_db.html b/docs/reference/get_veg_from_NPS_PLOTS_db.html index 74607a46..d1d3047d 100644 --- a/docs/reference/get_veg_from_NPS_PLOTS_db.html +++ b/docs/reference/get_veg_from_NPS_PLOTS_db.html @@ -133,7 +133,7 @@

    Arg

    Value

    -

    A dataframe with vegetation data in a long format with linkage to NRCS soil pedon data via the site_id key field.

    +

    A data.frame with vegetation data in a long format with linkage to NRCS soil pedon data via the site_id key field.

    Author

    Jay M. Skovlin

    diff --git a/docs/reference/get_veg_other_from_MT_veg_db.html b/docs/reference/get_veg_other_from_MT_veg_db.html index 90b549ad..bc7bcbb5 100644 --- a/docs/reference/get_veg_other_from_MT_veg_db.html +++ b/docs/reference/get_veg_other_from_MT_veg_db.html @@ -136,7 +136,7 @@

    Details

    This function currently works only on Windows.

    Value

    -

    A dataframe.

    +

    A data.frame.

    Author

    Jay M. Skovlin

    diff --git a/docs/reference/get_veg_species_from_MT_veg_db.html b/docs/reference/get_veg_species_from_MT_veg_db.html index b69d8065..de431e0d 100644 --- a/docs/reference/get_veg_species_from_MT_veg_db.html +++ b/docs/reference/get_veg_species_from_MT_veg_db.html @@ -136,7 +136,7 @@

    Details

    This function currently works only on Windows.

    Value

    -

    A dataframe.

    +

    A data.frame.

    Author

    Jay M. Skovlin

    diff --git a/docs/reference/index.html b/docs/reference/index.html index e3ec54b8..3b2dd3e9 100644 --- a/docs/reference/index.html +++ b/docs/reference/index.html @@ -138,7 +138,7 @@

    estimateColorMixture()

    -

    Estimate color mixture using L, A, B color coordinates and weights

    +

    Estimate color mixtures using weighted average of CIELAB color coordinates

    @@ -186,7 +186,7 @@

    fetchOSD()

    -

    Fetch Data by Soil Series Name

    +

    Fetch Official Series Descriptions and summaries from SoilWeb API

    @@ -198,7 +198,7 @@

    fetchRaCA()

    -

    Fetch KSSL Data (EXPERIMENTAL)

    +

    Get Rapid Carbon Assessment (RaCA) data

    @@ -414,7 +414,7 @@

    parseWebReport()

    -

    Parse contents of a web report, based on suplied arguments.

    +

    Parse contents of a web report, based on supplied arguments.

    diff --git a/docs/reference/loafercreek-1.png b/docs/reference/loafercreek-1.png index b4aa4a4d..0eecea0a 100644 Binary files a/docs/reference/loafercreek-1.png and b/docs/reference/loafercreek-1.png differ diff --git a/docs/reference/loafercreek-2.png b/docs/reference/loafercreek-2.png index f5108550..b04bcc1c 100644 Binary files a/docs/reference/loafercreek-2.png and b/docs/reference/loafercreek-2.png differ diff --git a/docs/reference/loafercreek-3.png b/docs/reference/loafercreek-3.png index a9eee9c0..9ff257d9 100644 Binary files a/docs/reference/loafercreek-3.png and b/docs/reference/loafercreek-3.png differ diff --git a/docs/reference/loafercreek-4.png b/docs/reference/loafercreek-4.png index 75720bca..1765b3cc 100644 Binary files a/docs/reference/loafercreek-4.png and b/docs/reference/loafercreek-4.png differ diff --git a/docs/reference/loafercreek-5.png b/docs/reference/loafercreek-5.png index 587fdc92..744141a9 100644 Binary files a/docs/reference/loafercreek-5.png and b/docs/reference/loafercreek-5.png differ diff --git a/docs/reference/loafercreek.html b/docs/reference/loafercreek.html index 41fe9d1c..8cc213e5 100644 --- a/docs/reference/loafercreek.html +++ b/docs/reference/loafercreek.html @@ -176,7 +176,7 @@

    Examp # add diagnostic horizons addDiagnosticBracket(loafercreek[1:10, ], kind='argillic horizon', col='red', offset=-0.4) } -
    # } +
    # }

    #> OGR data source with driver: GML -#> Source: "C:\Users\Dylan.Beaudette\Documents\RtmpigXG36\file2b3040ba3768.gml", layer: "mapunitpoly" -#> with 197 features -#> It has 8 fields
    #> single result set, returning a data.frame
    #> mukey muname -#> 1 462183 Aiken loam, 2 to 9 percent slopes, C Lower Montane -#> 2 462188 Aiken cobbly loam, 3 to 30 percent slopes -#> 3 462193 Argonaut loam, seeped variant -#> 4 462215 Chaix very rocky coarse sandy loam, 50 to 70 percent slopes -#> 5 462219 Cohasset loam, summits, 2 to 20 percent slopes, dry -#> 6 462220 Cohasset loam, shoulders, 3 to 20 percent slopes, dry
    # } +#> use options("rgdal_show_exportToProj4_warnings"="none") before loading rgdal.
    #> Warning: cannot open URL 'https://sdmdataaccess.nrcs.usda.gov/Spatial/SDMNAD83Geographic.wfs?Service=WFS&Version=1.0.0&Request=GetFeature&Typename=MapunitPoly&BBOX=-120.54,38.61,-120.41,38.7': HTTP status was '500 Internal Server Error'
    #> Error in download.file(url = u, destfile = tf.full, quiet = FALSE) : +#> cannot open URL 'https://sdmdataaccess.nrcs.usda.gov/Spatial/SDMNAD83Geographic.wfs?Service=WFS&Version=1.0.0&Request=GetFeature&Typename=MapunitPoly&BBOX=-120.54,38.61,-120.41,38.7'
    #> could not download XML result from SDA
    # }
    diff --git a/docs/reference/simplifyColorData.html b/docs/reference/simplifyColorData.html index bcb5ce0c..06286bba 100644 --- a/docs/reference/simplifyColorData.html +++ b/docs/reference/simplifyColorData.html @@ -136,7 +136,7 @@

    Arg x -

    a data.frame object containing sRGB cordinates associated with a group of colors to mix

    +

    a data.frame object containing sRGB coordinates associated with a group of colors to mix

    wt @@ -157,7 +157,7 @@

    Details

    This function is mainly intended for the processing of NASIS pedon/horizon data which may or may not contain multiple colors per horizon/moisture status combination. simplifyColorData will "mix" multiple colors associated with horizons in d, according to IDs specified by id.var, using "weights" (area percentages) specified by the wt argument to mix_and_clean_colors.

    Note that this function doesn't actually simulate the mixture of pigments on a surface, rather, "mixing" is approximated via weighted average in the CIELAB colorspace.

    The simplifyColorData function can be applied to data sources other than NASIS by careful use of the id.var and wt arguments. However, d must contain Munsell colors split into columns named "colorhue", "colorvalue", and "colorchroma". In addition, the moisture state ("Dry" or "Moist") must be specified in a column named "colormoistst".

    -

    The mix_and_clean_colors funcion can be applied to arbitrary data sources as long as x contains sRGB coordinates in columns named "r", "g", and "b". This function should be applied to chunks of rows within which color mixtures make sense.

    +

    The mix_and_clean_colors function can be applied to arbitrary data sources as long as x contains sRGB coordinates in columns named "r", "g", and "b". This function should be applied to chunks of rows within which color mixtures make sense.

    There are examples in the KSSL data tutorial and the soil color mixing tutorial.

    Author

    diff --git a/docs/reference/taxaExtent.html b/docs/reference/taxaExtent.html index 77abb09b..edc45e2c 100644 --- a/docs/reference/taxaExtent.html +++ b/docs/reference/taxaExtent.html @@ -40,7 +40,7 @@ - + @@ -117,7 +117,7 @@

    Retrieve Soil Taxonomy Membership Grids

    -

    This function downloads a generalized representation of the geographic extent of any single taxa from the top 4 tiers of Soil Taxonomy. Data are provided by SoilWeb, ultimately sourced from from the current SSURGO snapshot. Data are returned as raster objects representing area proportion falling within 800m cells. Data are only available in CONUS and returned using an albers equal area / NAD83 corrdinate reference system.

    +

    This function downloads a generalized representation of the geographic extent of any single taxa from the top 4 tiers of Soil Taxonomy. Data are provided by SoilWeb, ultimately sourced from from the current SSURGO snapshot. Data are returned as raster objects representing area proportion falling within 800m cells. Data are only available in CONUS and returned using an Albers Equal Area / NAD83 coordinate reference system.

    taxaExtent(
    @@ -160,42 +160,51 @@ 

    Examp curl::has_internet()) { library(raster) - library(rasterVis) - library(viridis) - library(soilDB) - library(mapview) + # try a couple of different examples + + # soil order taxa <- 'vertisols' x <- taxaExtent(taxa, level = 'order') - a <- aggregate(x, fact = 5) + a <- raster::aggregate(x, fact = 5) + # suborder taxa <- 'ustalfs' x <- taxaExtent(taxa, level = 'suborder') - a <- aggregate(x, fact = 5) + a <- raster::aggregate(x, fact = 5) + # greatgroup taxa <- 'haplohumults' x <- taxaExtent(taxa, level = 'greatgroup') - a <- aggregate(x, fact = 5) + a <- raster::aggregate(x, fact = 5) + # subgroup taxa <- 'Typic Haploxerepts' x <- taxaExtent(taxa, level = 'subgroup') - a <- aggregate(x, fact = 5) + a <- raster::aggregate(x, fact = 5) + # quick evaluation of the result + if(requireNamespace("rasterVis") & requireNamespace('viridis')) { + rasterVis::levelplot(a, + margin = FALSE, scales = list(draw = FALSE), + col.regions = viridis::viridis, + main = names(a) + ) + } - levelplot(a, margin = FALSE, scales = list(draw = FALSE), col.regions = viridis, main = names(a)) + # slippy map + if(requireNamespace("mapview")) { + mapview::mapview(a, col.regions = viridis::viridis, na.color = NA, use.layer.names = TRUE) + } - mapview(a, col.regions = viridis, na.color = NA, use.layer.names = TRUE) } -
    #> Loading required package: latticeExtra
    #> -#> Attaching package: 'latticeExtra'
    #> The following object is masked from 'package:ggplot2': -#> -#> layer
    #> Warning: Discarded datum Unknown based on GRS80 ellipsoid in CRS definition, +
    #> Warning: Discarded datum Unknown based on GRS80 ellipsoid in CRS definition, #> but +towgs84= values preserved
    #> Warning: Discarded datum Unknown based on GRS80 ellipsoid in CRS definition, #> but +towgs84= values preserved
    #> Warning: Discarded datum Unknown based on GRS80 ellipsoid in CRS definition, #> but +towgs84= values preserved
    #> Warning: Discarded datum Unknown based on GRS80 ellipsoid in CRS definition, -#> but +towgs84= values preserved
    #> Warning: Discarded ellps WGS 84 in CRS definition: +proj=merc +a=6378137 +b=6378137 +lat_ts=0 +lon_0=0 +x_0=0 +y_0=0 +k=1 +units=m +nadgrids=@null +wktext +no_defs
    #> Warning: Discarded datum WGS_1984 in CRS definition
    #> Warning: Discarded ellps WGS 84 in CRS definition: +proj=merc +a=6378137 +b=6378137 +lat_ts=0 +lon_0=0 +x_0=0 +y_0=0 +k=1 +units=m +nadgrids=@null +wktext +no_defs
    #> Warning: Discarded datum WGS_1984 in CRS definition
    +#> but +towgs84= values preserved
    #> Loading required namespace: rasterVis
    #> Loading required namespace: mapview
    #> Warning: Discarded ellps WGS 84 in CRS definition: +proj=merc +a=6378137 +b=6378137 +lat_ts=0 +lon_0=0 +x_0=0 +y_0=0 +k=1 +units=m +nadgrids=@null +wktext +no_defs
    #> Warning: Discarded datum WGS_1984 in CRS definition
    #> Warning: Discarded ellps WGS 84 in CRS definition: +proj=merc +a=6378137 +b=6378137 +lat_ts=0 +lon_0=0 +x_0=0 +y_0=0 +k=1 +units=m +nadgrids=@null +wktext +no_defs
    #> Warning: Discarded datum WGS_1984 in CRS definition
    # }

    diff --git a/docs/reference/us_ss_timeline.html b/docs/reference/us_ss_timeline.html index 1f545126..3b450b0b 100644 --- a/docs/reference/us_ss_timeline.html +++ b/docs/reference/us_ss_timeline.html @@ -129,7 +129,7 @@

    Formatssa

    Soil Survey name, a character vector

    year

    year of publication, a numeric vector

    pdf

    does a pdf exists, a logical vector

    -
    state

    State abbrevation, a character vector

    +
    state

    State abbreviation, a character vector

    @@ -140,57 +140,6 @@

    Sourcehttps://www.nrcs.usda.gov/wps/portal/nrcs/soilsurvey/soils/survey/state/

    -

    Examples

    -
    # \donttest{ -if (requireNamespace("curl") & - curl::has_internet() & - require("XML") & - require("RCurl") & - require("ggplot2") & - require("gridExtra") -) { - -data(state) -st <- paste0(c(state.abb, "PR", "DC", "VI", "PB")) -us_ss_timeline <- { - lapply(st, function(x) { - cat("getting", x, "\n") - url <- getURL(paste0( - "https://www.nrcs.usda.gov/wps/portal/nrcs/surveylist/soils/survey/state/?stateId=", x) - ) - df <- readHTMLTable(url, which = 22, stringsAsFactors = FALSE) - df$state <- x - return(df) - }) ->.; - do.call("rbind", .) ->.; - names(.) <- c("ssa", "year", "pdf", "wss", "state") - .[!grepl(.$year, pattern="current"), ] ->.; -} -us_ss_timeline <- within(us_ss_timeline, { - ssa = sapply(ssa, function(x) strsplit(x, "\r")[[1]][1]) - year = as.numeric(substr(year, 3,6)) - pdf = ifelse(pdf == "Yes", TRUE, FALSE) - wss = NULL -}) - -test <- as.data.frame(table(us_ss_timeline$year), stringsAsFactors = FALSE) - -g1 <- ggplot(data = test, aes(x = Var1, y = Freq)) + - geom_histogram(stat = "identity") + - xlab("Year") + - ylab("Count") + - theme(aspect.ratio = 1) + - ggtitle("Number of Published \n US Soil Surveys by Year") -g2 <- ggplot(test, aes(x = Var1, y = cumsum(Freq))) + - geom_histogram(stat = "identity") + - xlab("Year") + - ylab("Count") + - theme(aspect.ratio = 1) + - ggtitle("Cumulative Number of Published \n US Soil Surveys by Year") - -grid.arrange(g1, g2, ncol = 2) - -}# }
    #> Loading required package: XML
    #> Loading required package: RCurl
    #> getting AL
    #> Error in function (type, msg, asError = TRUE) { if (!is.character(type)) { i = match(type, CURLcodeValues) typeName = if (is.na(i)) character() else names(CURLcodeValues)[i] } typeName = gsub("^CURLE_", "", typeName) fun = (if (asError) stop else warning) fun(structure(list(message = msg, call = sys.call()), class = c(typeName, "GenericCurlError", "error", "condition")))}(35L, "error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version", TRUE): error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version