Skip to content

Commit

Permalink
Merge pull request #363 from ncss-tech/aqp21x
Browse files Browse the repository at this point in the history
Update SoilProfileCollection datasets for aqp 2.1.x
  • Loading branch information
brownag authored Oct 21, 2024
2 parents a7f6d22 + 67c6a1b commit 8604d18
Show file tree
Hide file tree
Showing 8 changed files with 1,876 additions and 1,872 deletions.
6 changes: 5 additions & 1 deletion data-raw/NASIS_SoilProfileCollections.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ data("mineralKing", package = "soilDB")
# # load source data sets (CA630 and CA792 pedons)
nasis_pedons <- fetchNASIS(rmHzErrors = FALSE, SS = FALSE)

p <- rebuildSPC(subset(nasis_pedons, siteiid %in% as.double(c(loafercreek, gopheridge, mineralKing)$siteiid)))
p <- rebuildSPC(subset(nasis_pedons, siteiid %in% c(loafercreek, gopheridge, mineralKing)$siteiid))
write.csv(horizons(p), "data-raw/spc-horizons.csv", row.names = FALSE)
write.csv(site(p), "data-raw/spc-site.csv", row.names = FALSE)
write.csv(diagnostic_hz(p), "data-raw/spc-diagnostic_hz.csv", row.names = FALSE)
Expand All @@ -34,6 +34,10 @@ loafercreek2 <- rebuildSPC(subset(recent1822a, profile_id(recent1822a) %in% prof
gopheridge2 <- rebuildSPC(subset(recent1822a, profile_id(recent1822a) %in% profile_id(gopheridge)))
mineralKing2 <- rebuildSPC(subset(recent1822a, profile_id(recent1822a) %in% profile_id(mineralKing)))

loafercreek2$hzID <- loafercreek$hzID
gopheridge2$hzID <- gopheridge2$hzID
mineralKing2$hzID <- mineralKing2$hzID

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

0 comments on commit 8604d18

Please sign in to comment.