Comments (6)
The function also needs to be renamed to simplifyFragmentData
--note the missing "i" in the current function name.
from soildb.
Note that issues related to fragment content >100% aren't always data errors, they can be related to multiple pedons / KSSL data source (c/o Brian Gardner):
HI Dylan,
As you recall I was coming up with erroneously high frag contents in some horizons on Kettenbach series. After a closer look, it seems like the function is being confused because for this series there are two pedons per site. As is practice we have one pedon owned by KSSL that remains unchanging and a second owned by the SSO that is updateable. The updateable one is checked as 'representative pedon'.
This creates a situation where there are two horizons in NASIS with the same horizon labsample number. A quick look at horizons where frags were less than 100% showed several that were still double what was recorded for the horizon in NASIS (for each individual pedon/horizon)
Maybe this is the source of the problem?
from soildb.
This function should also allow for custom specification of fragment classes as an argument.
from soildb.
Function re-named with backwards compatibility in e2b237d.
from soildb.
Another small issue, simplifyFragmentData
fails when passed a single row with null fragvol
:
d <- structure(list(phiid = 1386592L, fragvol = NA_real_, fragsize_l = NA_integer_,
fragsize_r = NA_integer_, fragsize_h = NA_integer_, fragshp = structure(NA_integer_, .Label = c("flat",
"nonflat"), class = "factor"), fraghard = structure(NA_integer_, .Label = c("noncemented",
"indurated", "moderately cemented", "strongly cemented",
"weakly cemented", "extremely weakly", "very weakly", "very strongly",
"weakly", "moderately", "strongly", "extremely strong", "H",
"S"), class = "factor")), .Names = c("phiid", "fragvol",
"fragsize_l", "fragsize_r", "fragsize_h", "fragshp", "fraghard"
), row.names = 1049L, class = "data.frame")
simplifyFragmentData(d, 'phiid')
Error: value.var (volume) not found in input
In addition: Warning message:
Error: value.var (volume) not found in input
This is a data population issue, consider pre-filtering rows without data.
from soildb.
Filtering solves the problem but we are now left with the issue of NA vs. 0 when there are no records in the phfrags table.
from soildb.
Related Issues (20)
- .pickBestEcosite() consideration of record_when_last_updated HOT 1
- Enhancing PLSS2LL and BLM API tools from sharpshootR HOT 2
- SDA_spatialQuery() for multiple features fails HOT 6
- Spotty NCCPI data HOT 7
- soilDB::mukey.wcs() fails when there is no mukey data in gSSURGO HOT 10
- get_mapunit_from_SDA() fails for some mukeys HOT 8
- test mukey.wcs against local calls to crop() on mukey grid HOT 12
- mirror WCS across SoilWeb servers HOT 2
- Randomly bad calls to fetch data HOT 7
- fetchGDB child tables HOT 5
- upgrade `createStaticNASIS()` selected set behavior HOT 1
- `get_SDA_interpretation` sometimes throws warning for NCCPI HOT 3
- `.create_wide_reason` failing when `dsn` passed to `get_SDA_interpretation` HOT 7
- `createSSURGO()` should create indices for tables/columns commonly used by soilDB queries HOT 2
- use of aqp::rgb2munsell() in soilDB HOT 1
- SPC Setup From Local Selected Set Failing HOT 9
- CRAN failures related to `fetchHenry()` and `waterDayYear()` HOT 2
- bad error for gateway time out HOT 3
- fetchNASIS: add summaries of phorizon child tables for bulk density and Ksat
- fetchSDA_spatial/SDA_spatialQuery: add support for point/line mapunit and feature point/line geometry HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from soildb.