-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
encoding factors in fetch* functions #241
Comments
brownag
added a commit
that referenced
this issue
Mar 10, 2022
I added two new domain attributes to the query used by
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
A couple of thoughts:
fetchNASIS
,fetchSDA
, etc.uncode()
performs the de-coding of values in NASIS, using the latest version of the metadata table from the local database (if possible)fetchNASIS
or global preference set withoption()
Chain of functionality:
uncode()
all coded columns, optionally converting to factors using metadata (`encodeFactors='all')encodeFactors='some') or none (
encodeFactors='none')Apart from the compatibility issue with a pending version of R, there are no reasons why we can't all get what we want out of NASIS. The factor-conversion code can be written to look for NASIS column names, and encode levels according to either the metadata or a manually-specified vector. An
invert
argument can be added to reverse factor levels which is sometimes handy. That said, I don't think that we should attempt to convert all character data → factors (e.g. parent material origin) by default, just those that are most commonly used as factors (texture class, hillslope position, drainage class, etc.).The new function / functions will likely be internal to soilDB, and will "know" how to exclude IDs.
Finally, I suggest that
fetchNASIS()
should default to:>n
unique valuesThe text was updated successfully, but these errors were encountered: