Skip to content

Commit

Permalink
Update loafercreek/gopheridge/mineralKing from NASIS
Browse files Browse the repository at this point in the history
  • Loading branch information
brownag committed Dec 14, 2021
1 parent 9939e33 commit c6c631c
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 8 deletions.
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* `SDA_spatialQuery()` and `processSDA_WKT()` fully use {sf}, replacing {sp} in these contexts
* `SDA_spatialQuery()` gains argument `byFeature` to use multiple single-feature queries and combine the results with a unique feature ID specified by `idcol` argument. This allows for specific feature intersection results without secondary spatial overlay of the polygons (https://github.com/ncss-tech/soilDB/issues/222)
* `dbConnectNASIS()` no longer requires that the NASIS credentials option be set if the `dsn` argument is specified.
* Rebuilt `loafercreek`, `gopheridge` and `mineralKing` from latest `fetchNASIS()` results.

# soilDB 2.6.9 (2021-12-02)
* Replaced functionality using {plyr}/{reshape2} with {base}/{data.table}
Expand Down
Binary file modified data/gopheridge.rda
Binary file not shown.
Binary file modified data/loafercreek.rda
Binary file not shown.
Binary file modified data/mineralKing.rda
Binary file not shown.
21 changes: 13 additions & 8 deletions misc/make-example-data.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,26 @@ data("mineralKing", package = "soilDB")
# query CA630 and CA792 w/ R08 PEDON/SITE by SSA ID or similar

# load target data sets (CA630 and CA792 pedons)
recent1822a <- fetchNASIS(rmHzErrors = FALSE)
recent1822a <- fetchNASIS(rmHzErrors = FALSE, SS = FALSE)

# subset and rebuild
loafercreek2 <- rebuildSPC(subset(recent1822a, profile_id(recent1822a) %in% profile_id(loafercreek)))
gopheridge2 <- rebuildSPC(subset(recent1822a, profile_id(recent1822a) %in% profile_id(gopheridge)))
mineralKing2 <- rebuildSPC(subset(recent1822a, profile_id(recent1822a) %in% profile_id(mineralKing)))
# subset
loafercreek2 <- subset(recent1822a, profile_id(recent1822a) %in% profile_id(loafercreek))
gopheridge2 <- subset(recent1822a, profile_id(recent1822a) %in% profile_id(gopheridge))
mineralKing2 <- subset(recent1822a, profile_id(recent1822a) %in% profile_id(mineralKing))

# ensure that phiid is set as hzID
hzidname(loafercreek2) <- "phiid"
hzidname(gopheridge2) <- "phiid"
hzidname(mineralKing2) <- "phiid"

# verify completeness
if(all(profile_id(loafercreek) %in% profile_id(loafercreek2)))
if (all(profile_id(loafercreek) %in% profile_id(loafercreek2)))
loafercreek <- loafercreek2

if(all(profile_id(gopheridge) %in% profile_id(gopheridge2)))
if (all(profile_id(gopheridge) %in% profile_id(gopheridge2)))
gopheridge <- gopheridge2

if(all(profile_id(mineralKing) %in% profile_id(mineralKing2)))
if (all(profile_id(mineralKing) %in% profile_id(mineralKing2)))
mineralKing <- mineralKing2

# save to .rda
Expand Down

0 comments on commit c6c631c

Please sign in to comment.