-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
fetchNASIS('pedons')
: use simplifyFragmentData()
for surface fragments
#216
Conversation
Quick test with 3 new pedons that only have site + minimal horizon data entered so far. Before:library(soilDB)
f <- fetchNASIS()
#> Loading required namespace: odbc
#> NOTE: all records are missing rock fragment volume
#> NOTE: all records are missing artifact volume
names(f)[grepl("surface_", names(f))]
#> site78 site79 site80
#> "surface_fgravel" "surface_gravel" "surface_cobbles"
#> site81 site82 site83
#> "surface_stones" "surface_boulders" "surface_channers"
#> site84 site85 site86
#> "surface_flagstones" "surface_paragravel" "surface_paracobbles"
f$surface_gravel
#> [1] 5 1 15
f$surface_total_frags_pct
#> NULL After:EDIT: fixed ordering! Was using siteiid not peiid; library(soilDB)
f <- fetchNASIS()
#> Loading required namespace: odbc
#> NOTE: all records are missing rock fragment volume
#> NOTE: all records are missing artifact volume
names(f)[grepl("surface_", names(f))]
#> site51 site52
#> "surface_fine_gravel" "surface_gravel"
#> site53 site54
#> "surface_cobbles" "surface_stones"
#> site55 site56
#> "surface_boulders" "surface_channers"
#> site57 site58
#> "surface_flagstones" "surface_parafine_gravel"
#> site59 site60
#> "surface_paragravel" "surface_paracobbles"
#> site61 site62
#> "surface_parastones" "surface_paraboulders"
#> site63 site64
#> "surface_parachanners" "surface_paraflagstones"
#> site65 site66
#> "surface_unspecified" "surface_total_frags_pct_nopf"
#> site67
#> "surface_total_frags_pct"
f$surface_gravel
#> [1] 5 1 15
f$surface_total_frags_pct
#> [1] 24 34 20 Here is a summary of things needing resolution before this can be merged:
|
Thanks for making these changes. That TODO has been in there for a long time. I agree with your suggestions on items 1-3. We may need to craft some example data with multiple siteObs... I hadn't thought about that possibility. A new |
Edited above post. Fixed an issue with using siteiid and unintentional assumed sorting matching that of peiid. Now the peiid column is returned by the surface frags table query and passed to simplifyFragmentData. |
Closes #46