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 @@
Dylan Beaudette. Maintainer, author. +
Dylan Beaudette. Author.
Andrew Brown. Author. +
Andrew Brown. Author, maintainer.
NEWS.md
- fetchNASIS
/ soilDB:::.rockFragmentSieve
now uses fragment RV, soilDB:::.sieve
uses <
operator (https://github.com/ncss-tech/soilDB/issues/1)fetchKSSL(..., returnMorphologicData=TRUE)
now returns redoximorphic features by horizontaxaExtent
returns 800m gridded taxonomic grids for CONUSseriesExtent
can now return 800m gridded series extents for CONUSSDA_spatialQuery
can now retrieve SSURGO and STATSGO geometry c/o dschlaep (https://github.com/ncss-tech/soilDB/issues/141)SDA_spatialQuery
for querying tabular / spatial records via SDA given Spatial*
class input featuresdata.table
; beginning to implement data.table-aware methods in aqp and soilDB
+fetchGDB
for querying tabular data from SSURGO/gNATSGO/STATSGO File GeodatabasesfetchSoilGrids
for point data queries to SoilGrids v2 API with SoilProfileCollection outputget_NOAA_GHCND()
and get_NOAA_stations_nearXY()
for batch queries of NOAA Daily Climate Data (requires free API token)fetchSDA_spatial
with chunk.size
> 1 resulting in duplicate data in resultfetchSDA_spatial
with chunk.size
> 1 resulting in duplicate data in resultfetchSDA_spatial
to handle queries that exceed JSON Serialization Limitdata.table
; beginning to implement data.table-aware methods in aqp and soilDB
-fetchSoilGrids
for point data queries to SoilGrids v2 API with SoilProfileCollection outputfetchKSSL(..., returnGeochemicalData=TRUE)
now returns geochemical, optical and XRD/thermal datafetchNASIS(from='components', fill=TRUE, rmHzErrors=TRUE)
in context of new ::hzDepthTests()
and non-unique chiid
due to NA
values introduced by fill
+fetchNASIS(from='components', fill=TRUE, rmHzErrors=TRUE)
in context of new ::hzDepthTests()
and non-unique chiid
due to NA
values introduced by fill
fetchNASIS_pedons()
fetchNASIS()
has @restrictions set automaticlly if data are populatedfetchNASIS()
has @restrictions set automatically if data are populated
get_RMF_from_NASIS_db()
reshape
package, will transition to reshape2
with soilDB 2.0This 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:
saturated water content, values should be in the range of {0, 1}
residual water content, values should be in the range of {0, 1}
related to the inverse of the air entry suction, function expects log10-tranformed values with units of cm
index of pore size distribution, function expects log10-tranformed values with units of 1/cm
related to the inverse of the air entry suction, function expects log10-transformed values with units of cm
index of pore size distribution, function expects log10-transformed values with units of 1/cm
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
@@ -193,9 +193,7 @@ geog_assoc_soils -+ search geographicaly associated soils section
search geographically associated soils section
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 @@
a data.frame result (NULL
if empty, try-error on error)
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.
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 @@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
what -+ a character vector specifting what to return. 'mukey':
data.frame
with intersecting map unit keys and names,geom
overlapping or intersecting map unit polygonsa character vector specifying what to return. 'mukey':
data.frame
with intersecting map unit keys and names,geom
overlapping or intersecting map unit polygonsgeomIntersection @@ -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 usingwhat = "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
@@ -254,14 +254,13 @@geom
and returned object. Usesp::over()
or similar functionality to extract from results. Polygon area in acres is computed server-side whenwhat = 'geom'
andgeomIntersection = TRUE
.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#>#>#>#>#>#>#>#>#>#>#> 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.#>#>#>#>#>#>#>#>#>#># } +#> 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: 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.#>#>#>#>#>#>#>#>#>#># }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# }permafrost -+ logical: permafrost presence / absense
logical: permafrost presence / absence
pt.cex @@ -167,7 +167,7 @@See a
Examples
+O.hz -+ logical vector of O horizon presence / absense
logical vector of O horizon presence / absence
saturated @@ -147,14 +147,13 @@Arg
permafrost -+ logical vector of permafrost presence / absense
logical vector of permafrost presence / absence
Details
-Pending.
- +Value
Vector of soil temperature regimes.
diff --git a/docs/reference/fetchGDB.html b/docs/reference/fetchGDB.html index a65b3a66..8c091adb 100644 --- a/docs/reference/fetchGDB.html +++ b/docs/reference/fetchGDB.html @@ -158,7 +158,7 @@Arg
WHERE -+ text string formated as an SQL WHERE clause (default: FALSE)
text string formatted as an SQL WHERE clause (default: FALSE)
childs @@ -180,7 +180,7 @@Arg
Details
-These functions return data from SSURGO file geodatabases with the use of a simple text string that formated as an SQL WHERE clause (e.g.
+WHERE = "areasymbol = 'IN001'"
. Any columns within the target table can be specified (except for fetchGDB() currently, which only targets the legend with the WHERE clause).These functions return data from SSURGO file geodatabases with the use of a simple text string that formatted as an SQL WHERE clause (e.g.
WHERE = "areasymbol = 'IN001'"
. Any columns within the target table can be specified (except for fetchGDB() currently, which only targets the legend with the WHERE clause).Value
A
diff --git a/docs/reference/fetchHenry-1.png b/docs/reference/fetchHenry-1.png index 383177ea..a3c3594a 100644 Binary files a/docs/reference/fetchHenry-1.png and b/docs/reference/fetchHenry-1.png differ diff --git a/docs/reference/fetchHenry.html b/docs/reference/fetchHenry.html index 331959fe..060f4837 100644 --- a/docs/reference/fetchHenry.html +++ b/docs/reference/fetchHenry.html @@ -204,7 +204,7 @@data.frame
orSoilProfileCollection
object.Examp xlab='Julian Day', ylab='Year') } -
#>#>#> | | | 0% | | | 1% | |= | 1% | |= | 2% | |== | 2% | |== | 3% | |== | 4% | |=== | 4% | |=== | 5% | |==== | 5% | |==== | 6% | |===== | 6% | |===== | 7% | |===== | 8% | |====== | 8% | |====== | 9% | |======= | 9% | |======= | 10% | |======= | 11% | |======== | 11% | |======== | 12% | |========= | 12% | |========= | 13% | |========= | 14% | |========== | 14% | |========== | 15% | |=========== | 15% | |=========== | 16% | |============ | 16% | |============ | 17% | |============ | 18% | |============= | 18% | |============= | 19% | |============== | 19% | |============== | 20% | |============== | 21% | |=============== | 21% | |=============== | 22% | |================ | 22% | |================ | 23% | |================ | 24% | |================= | 24% | |================= | 25% | |================== | 25% | |================== | 26% | |=================== | 26% | |=================== | 27% | |=================== | 28% | |==================== | 28% | |==================== | 29% | |===================== | 29% | |===================== | 30% | |===================== | 31% | |====================== | 31% | |====================== | 32% | |======================= | 32% | |======================= | 33% | |======================= | 34% | |======================== | 34% | |======================== | 35% | |========================= | 35% | |========================= | 36% | |========================== | 36% | |========================== | 37% | |========================== | 38% | |=========================== | 38% | |=========================== | 39% | |============================ | 39% | |============================ | 40% | |============================ | 41% | |============================= | 41% | |============================= | 42% | |============================== | 42% | |============================== | 43% | |============================== | 44% | |=============================== | 44% | |=============================== | 45% | |================================ | 45% | |================================ | 46% | |================================= | 46% | |================================= | 47% | |================================= | 48% | |================================== | 48% | |================================== | 49% | |=================================== | 49% | |=================================== | 50% | |=================================== | 51% | |==================================== | 51% | |==================================== | 52% | |===================================== | 52% | |===================================== | 53% | |===================================== | 54% | |====================================== | 54% | |====================================== | 55% | |======================================= | 55% | |======================================= | 56% | |======================================== | 56% | |======================================== | 57% | |======================================== | 58% | |========================================= | 58% | |========================================= | 59% | |========================================== | 59% | |========================================== | 60% | |========================================== | 61% | |=========================================== | 61% | |=========================================== | 62% | |============================================ | 62% | |============================================ | 63% | |============================================ | 64% | |============================================= | 64% | |============================================= | 65% | |============================================== | 65% | |============================================== | 66% | |=============================================== | 66% | |=============================================== | 67% | |=============================================== | 68% | |================================================ | 68% | |================================================ | 69% | |================================================= | 69% | |================================================= | 70% | |================================================= | 71% | |================================================== | 71% | |================================================== | 72% | |=================================================== | 72% | |=================================================== | 73% | |=================================================== | 74% | |==================================================== | 74% | |==================================================== | 75% | |===================================================== | 75% | |===================================================== | 76% | |====================================================== | 76% | |====================================================== | 77% | |====================================================== | 78% | |======================================================= | 78% | |======================================================= | 79% | |======================================================== | 79% | |======================================================== | 80% | |======================================================== | 81% | |========================================================= | 81% | |========================================================= | 82% | |========================================================== | 82% | |========================================================== | 83% | |========================================================== | 84% | |=========================================================== | 84% | |=========================================================== | 85% | |============================================================ | 85% | |============================================================ | 86% | |============================================================= | 86% | |============================================================= | 87% | |============================================================= | 88% | |============================================================== | 88% | |============================================================== | 89% | |=============================================================== | 89% | |=============================================================== | 90% | |=============================================================== | 91% | |================================================================ | 91% | |================================================================ | 92% | |================================================================= | 92% | |================================================================= | 93% | |================================================================= | 94% | |================================================================== | 94% | |================================================================== | 95% | |=================================================================== | 95% | |=================================================================== | 96% | |==================================================================== | 96% | |==================================================================== | 97% | |==================================================================== | 98% | |===================================================================== | 98% | |===================================================================== | 99% | |======================================================================| 99% | |======================================================================| 100%#># } +#>#>#> | | | 0% | | | 1% | |= | 1% | |= | 2% | |== | 2% | |== | 3% | |== | 4% | |=== | 4% | |=== | 5% | |==== | 5% | |==== | 6% | |===== | 6% | |===== | 7% | |===== | 8% | |====== | 8% | |====== | 9% | |======= | 9% | |======= | 10% | |======= | 11% | |======== | 11% | |======== | 12% | |========= | 12% | |========= | 13% | |========= | 14% | |========== | 14% | |========== | 15% | |=========== | 15% | |=========== | 16% | |============ | 16% | |============ | 17% | |============ | 18% | |============= | 18% | |============= | 19% | |============== | 19% | |============== | 20% | |============== | 21% | |=============== | 21% | |=============== | 22% | |================ | 22% | |================ | 23% | |================ | 24% | |================= | 24% | |================= | 25% | |================== | 25% | |================== | 26% | |=================== | 26% | |=================== | 27% | |=================== | 28% | |==================== | 28% | |==================== | 29% | |===================== | 29% | |===================== | 30% | |===================== | 31% | |====================== | 31% | |====================== | 32% | |======================= | 32% | |======================= | 33% | |======================= | 34% | |======================== | 34% | |======================== | 35% | |========================= | 35% | |========================= | 36% | |========================== | 36% | |========================== | 37% | |========================== | 38% | |=========================== | 38% | |=========================== | 39% | |============================ | 39% | |============================ | 40% | |============================ | 41% | |============================= | 41% | |============================= | 42% | |============================== | 42% | |============================== | 43% | |============================== | 44% | |=============================== | 44% | |=============================== | 45% | |================================ | 45% | |================================ | 46% | |================================= | 46% | |================================= | 47% | |================================= | 48% | |================================== | 48% | |================================== | 49% | |=================================== | 49% | |=================================== | 50% | |=================================== | 51% | |==================================== | 51% | |==================================== | 52% | |===================================== | 52% | |===================================== | 53% | |===================================== | 54% | |====================================== | 54% | |====================================== | 55% | |======================================= | 55% | |======================================= | 56% | |======================================== | 56% | |======================================== | 57% | |======================================== | 58% | |========================================= | 58% | |========================================= | 59% | |========================================== | 59% | |========================================== | 60% | |========================================== | 61% | |=========================================== | 61% | |=========================================== | 62% | |============================================ | 62% | |============================================ | 63% | |============================================ | 64% | |============================================= | 64% | |============================================= | 65% | |============================================== | 65% | |============================================== | 66% | |=============================================== | 66% | |=============================================== | 67% | |=============================================== | 68% | |================================================ | 68% | |================================================ | 69% | |================================================= | 69% | |================================================= | 70% | |================================================= | 71% | |================================================== | 71% | |================================================== | 72% | |=================================================== | 72% | |=================================================== | 73% | |=================================================== | 74% | |==================================================== | 74% | |==================================================== | 75% | |===================================================== | 75% | |===================================================== | 76% | |====================================================== | 76% | |====================================================== | 77% | |====================================================== | 78% | |======================================================= | 78% | |======================================================= | 79% | |======================================================== | 79% | |======================================================== | 80% | |======================================================== | 81% | |========================================================= | 81% | |========================================================= | 82% | |========================================================== | 82% | |========================================================== | 83% | |========================================================== | 84% | |=========================================================== | 84% | |=========================================================== | 85% | |============================================================ | 85% | |============================================================ | 86% | |============================================================= | 86% | |============================================================= | 87% | |============================================================= | 88% | |============================================================== | 88% | |============================================================== | 89% | |=============================================================== | 89% | |=============================================================== | 90% | |=============================================================== | 91% | |================================================================ | 91% | |================================================================ | 92% | |================================================================= | 92% | |================================================================= | 93% | |================================================================= | 94% | |================================================================== | 94% | |================================================================== | 95% | |=================================================================== | 95% | |=================================================================== | 96% | |==================================================================== | 96% | |==================================================================== | 97% | |==================================================================== | 98% | |===================================================================== | 98% | |===================================================================== | 99% | |======================================================================| 99% | |======================================================================| 100%#># }#>#> +#>#> #>#>#> -#>#>-#> -#>#> +#>#> #>#>#> -#>#>#>#>#>#># } +#>#>#>#>#>#># }#>#>#>#>#>#>#> 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`?+#>#>#> +#>#>+#> +#>#>#>#>#>#> 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 @@-Fetch Data by Soil Series Name
- +Fetch Official Series Descriptions and summaries from SoilWeb API
+ Source:R/fetchOSD.R
fetchOSD.Rd
--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
-
soils -+ a character vector of named soil series, case insensitive
a character vector of named soil series; case-insensitive
colorState @@ -139,95 +139,70 @@Arg
Details
+Value
- +a
+SoilProfileCollection
object containing basic soil morphology and taxonomic information.Details
-Related documentation can be found in the following tutorials
-
The standard set of "site" and "horizon" data are returned as a- + - - -
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 settingextended=TRUE
. The resulting object will be alist
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.SoilProfileCollection
object (extended=FALSE
. The "extended" suite of summary data can be requested by settingextended=TRUE
. The resulting object will be alist
with the following elements:)+
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`).- 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
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.
- 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.
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
+#> $ soilweb.metadata:'data.frame': 15 obs. of 2 variables:# \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:
# } -# } +@@ -144,7 +144,7 @@ p4s -+ PROJ4 CRS defintion, typically GCS WGS84
PROJ4 CRS definition, typically GCS WGS84
Value
A
Spatial*
object.Details
-The SDA website can be found at http://sdmdataaccess.nrcs.usda.gov. See the SDA Tutorial for detailed examples.
+The SDA website can be found at https://sdmdataaccess.nrcs.usda.gov. See the SDA Tutorial for detailed examples.
Note
This function requires the `httr`, `jsonlite`, `XML`, and `rgeos` packages.
diff --git a/docs/reference/seriesExtent-1.png b/docs/reference/seriesExtent-1.png index ad732f1c..fe7e2aa9 100644 Binary files a/docs/reference/seriesExtent-1.png and b/docs/reference/seriesExtent-1.png differ diff --git a/docs/reference/seriesExtent.html b/docs/reference/seriesExtent.html index 96f1a816..a166b74e 100644 --- a/docs/reference/seriesExtent.html +++ b/docs/reference/seriesExtent.html @@ -40,7 +40,7 @@ - + @@ -117,7 +117,7 @@Retrieve Soil Series Extent Maps from SoilWeb
-This function downloads a generalized representations of a soil series extent from SoilWeb, derived from the current SSURGO snapshot. Data can be returned as vector outlines (
+SpatialPolygonsDataFrame
object) or gridded representation of area proportion falling within 800m cells (raster
object). Gridded series extent data are only available in CONUS. Vector representations are returned with a GCS/WGS84 coordinate reference system and raster representartions are returned with an albers equal area / NAD83 corrdinate reference system.This function downloads a generalized representations of a soil series extent from SoilWeb, derived from the current SSURGO snapshot. Data can be returned as vector outlines (
SpatialPolygonsDataFrame
object) or gridded representation of area proportion falling within 800m cells (raster
object). Gridded series extent data are only available in CONUS. Vector representations are returned with a GCS/WGS84 coordinate reference system and raster representations are returned with an Albers Equal Area / NAD83 coordinate reference system.seriesExtent(s, type = c("vector", "raster"), timeout = 60)@@ -141,10 +141,10 @@Arg
Note
-This function requires the
+rgdal
package. Warning messages about the proj4 CRS spefication may be printed dependinng on your version ofrgdal
. This should be resolved soon.This function requires the
rgdal
package. Warning messages about the proj4 CRS specification may be printed depending on your version ofrgdal
. This should be resolved soon.References
- +https://casoilresource.lawr.ucdavis.edu/see/
Author
D.E. Beaudette
@@ -184,7 +184,7 @@Examp }
#> Warning: Discarded datum Unknown based on GRS80 ellipsoid in CRS definition, #> but +towgs84= values preserved#> Warning: CRS object has comment, which is lost in output#> Warning: Discarded datum Unknown based on GRS80 ellipsoid in CRS definition, -#> but +towgs84= values preserved# } +#> but +towgs84= values preserved# }
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
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.
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 @@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 @@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) } -
#>#> -#>#>-#> -#>#> 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#>#>#> 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# }
ssa
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
# \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) - -}# }#>#>#> 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