From 386da74813dc0e6364211551b5e120a4e03adac5 Mon Sep 17 00:00:00 2001 From: Beaudette Date: Tue, 26 Sep 2023 11:07:26 -0700 Subject: [PATCH] fixing typos --- docs/SDA.Rmd | 28 +++++++++++++-------- docs/SDA.html | 68 ++++++++++++++++++++++++--------------------------- 2 files changed, 50 insertions(+), 46 deletions(-) diff --git a/docs/SDA.Rmd b/docs/SDA.Rmd index eea8f9d..77fdd0e 100644 --- a/docs/SDA.Rmd +++ b/docs/SDA.Rmd @@ -94,18 +94,19 @@ kable_styling( ``` +# Manually Written Queries -# Sequoia-Kings Canyon (CA792) +## Sequoia-Kings Canyon (CA792) This example demonstrates a 2-stage approach to identifying pedons that have been sampled for laboratory characterization by soil survey area symbol. -## Site/Pedon Data + Load required libraries ```{r} library(soilDB) library(aqp) ``` - +Querying by soil survey area code is useful for reviewing those data collected to support a new soil survey or to perform updates to an existing soil survey. ```{r} sql <- " SELECT @@ -124,7 +125,7 @@ head(pedons) ``` -### Pedon Locations +Review pedon locations with an interactive map. ```{r} library(mapview) library(sf) @@ -136,12 +137,12 @@ mapview(pedons.sf) ``` -## Layer / Physical / Chemical Properties +Connect physical and chemical properties to sampled "layers" (usually genetic soil horizons). +Join conditions: * lab_pedon -> lab_layer [pedon_key] * lab_layer -> lab_physical_properties [labsampnum] - ```{r} # make a quoted vector of pedon keys, for use in the next query pedon.keys <- format_SQL_in_statement(pedons$pedon_key) @@ -170,7 +171,7 @@ table(hz$particle_size_method) ``` -## Investigate Soil Texture +Investigate soil texture. ```{r fig.width=8, fig.height=8} # remove missing values ssc <- na.omit(hz[, c('sand_total', 'silt_total', 'clay_total')]) @@ -181,7 +182,7 @@ names(ssc) <- c('SAND', 'SILT', 'CLAY') textureTriangleSummary(ssc, cex = 0.5) ``` -## Profile Sketches +Review thematic (1:1 soil:water pH) soil profile sketches. ```{r fig.width=12, fig.height=6} # make a copy and x <- hz @@ -201,10 +202,9 @@ plotSPC( ) ``` -## Join Pedon + Horizon Data -# Investigate Bx Horizons +## Investigate Bx Horizons ```{r fig.width=8, fig.height=8} library(soiltexture) library(scales) @@ -266,6 +266,14 @@ TT.plot( ``` +# Convenience Functions + +## fetchLDM() + +```{r eval=FALSE} +x <- fetchLDM(what = 'pierre', bycol = 'corr_name') + +``` diff --git a/docs/SDA.html b/docs/SDA.html index 3e8cf9d..23ed462 100644 --- a/docs/SDA.html +++ b/docs/SDA.html @@ -8825,21 +8825,25 @@

3.1 Table

3.2 Column Descriptions

-
- +
+
-
-

4 Sequoia-Kings Canyon -(CA792)

+
+

4 Manually Written +Queries

+
+

4.1 Sequoia-Kings Canyon +(CA792)

This example demonstrates a 2-stage approach to identifying pedons that have been sampled for laboratory characterization by soil survey area symbol.

-
-

4.1 Site/Pedon Data

Load required libraries

library(soilDB)
 library(aqp)
+

Querying by soil survey area code is useful for reviewing those data +collected to support a new soil survey or to perform updates to an +existing soil survey.

sql <- "
 SELECT
 pedon_key, pedlabsampnum, pedoniid, upedonid, longitude_decimal_degrees, latitude_decimal_degrees,
@@ -8869,9 +8873,7 @@ 

4.1 Site/Pedon Data

## 4 CA792 ## 5 CA792 ## 6 CA792
-
-

4.1.1 Pedon -Locations

+

Review pedon locations with an interactive map.

library(mapview)
 library(sf)
 
@@ -8879,17 +8881,12 @@ 

4.1.1 Pedon pedons.sf <- st_as_sf(pedons.sub, coords = c('longitude_decimal_degrees', 'latitude_decimal_degrees'), crs = 4326) mapview(pedons.sf)

-
- -
-
-
-

4.2 Layer / Physical / -Chemical Properties

-
    -
  • lab_pedon -> lab_layer [pedon_key]
  • -
  • lab_layer -> lab_physical_properties [labsampnum]
  • -
+
+ +

Connect physical and chemical properties to sampled “layers” (usually +genetic soil horizons).

+

Join conditions: * lab_pedon -> lab_layer [pedon_key] * lab_layer +-> lab_physical_properties [labsampnum]

# make a quoted vector of pedon keys, for use in the next query
 pedon.keys <- format_SQL_in_statement(pedons$pedon_key)
 
@@ -8931,10 +8928,7 @@ 

4.2 Layer / Physical /
## 
 ## 3A1a1a 
 ##    201
-

-
-

4.3 Investigate Soil -Texture

+

Investigate soil texture.

# remove missing values
 ssc <- na.omit(hz[, c('sand_total', 'silt_total', 'clay_total')])
 
@@ -8943,9 +8937,7 @@ 

4.3 Investigate Soil textureTriangleSummary(ssc, cex = 0.5)

-
-
-

4.4 Profile Sketches

+

Review thematic (1:1 soil:water pH) soil profile sketches.

# make a copy and
 x <- hz
 
@@ -8964,14 +8956,9 @@ 

4.4 Profile Sketches

)

-
-

4.5 Join Pedon + Horizon -Data

-
-
-
-

5 Investigate Bx -Horizons

+
+

4.2 Investigate Bx +Horizons

library(soiltexture)
 library(scales)
 
@@ -9035,10 +9022,19 @@ 

5 Investigate Bx arrows.show=TRUE )

+
+
+
+

5 Convenience +Functions

+
+

5.1 fetchLDM()

+
x <- fetchLDM(what = 'pierre', bycol = 'corr_name')

This document is based on aqp version 2.0.2 and soilDB version 2.7.8.

+