Skip to content
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

Taxonomic class names in fetchOSD result #256

Closed
brownag opened this issue Jul 22, 2022 · 7 comments
Closed

Taxonomic class names in fetchOSD result #256

brownag opened this issue Jul 22, 2022 · 7 comments
Assignees
Labels
SoilWeb Related to the SoilWeb / UCDavis LAWR servers, Henry Mount DB, backend functionality and public API wontfix

Comments

@brownag
Copy link
Member

brownag commented Jul 22, 2022

I didn't realize or had forgotten that soilDB::fetchOSD() returns family subgroup greatgroup suborder and soilorder rather than taxclname taxsubgrp taxgrtgroup taxsuborder taxorder. I think where possible we should standardize on the NASIS physical column names for soilDB results, which would mean also possibly changing those with underscore separating "tax" and the rest of the column name e.g. tax_partsize

Related #242

@brownag
Copy link
Member Author

brownag commented Jul 22, 2022

Related PR for sharpshootR::SoilTaxonomyDendrogram():
ncss-tech/sharpshootR#45

Related issue in SoilTaxonomy:
ncss-tech/SoilTaxonomy#38

@dylanbeaudette
Copy link
Member

Thanks. Parity with NASIS and other functions is a good idea, but changes to fetchOSD will require a lot of testing. I'll start that process after WCSS.

@brownag
Copy link
Member Author

brownag commented Jul 22, 2022

Have those columns always existed by those names in fetchOSD? I was a bit surprised to seem them in there

@dylanbeaudette
Copy link
Member

Yes, they are inherited from the SoilWeb API that returns most of the data. I can't remember, but suspect that those names date back to before fetchOSD was a function and before soilDB was a package.

@brownag
Copy link
Member Author

brownag commented Jul 22, 2022

Yeah, I dug back and you are right, and they were the original names used in SoilTaxonomy. I mis-remembered what had been changed there. EDIT: some functions like isValidST used names like 'tax_order', 'tax_suborder', 'tax_greatgroup', 'tax_subgroup

But anyway... names should be standardized in long run. Not a big deal or an immediate issue, I just was thinking that most of the standardization items have focused on NASIS data access functions so far. Would probably be good to get SoilWeb on board across the board where possible, and a specific issue to implement it.

@brownag
Copy link
Member Author

brownag commented Jul 22, 2022

And changing all that stuff to properly resolve #242 is probably a milestone for soilDB 3.0 -- as changing column names that are frequently used will wreak all sorts of havoc even if we test.

@brownag brownag added the SoilWeb Related to the SoilWeb / UCDavis LAWR servers, Henry Mount DB, backend functionality and public API label Jul 22, 2022
@brownag brownag assigned brownag and dylanbeaudette and unassigned brownag Jul 22, 2022
@brownag
Copy link
Member Author

brownag commented Nov 16, 2023

I think the SoilTaxonomy v0.2.4 parse_family() routine covers the general case of converting taxonomic classes/domains for a series of interest to their NASIS column names. There is probably no need to change this in the fetchOSD() result.

library(soilDB)
library(SoilTaxonomy)

o <- fetchOSD("alberti")
x <- parse_family(o$family)
x
#>                                                    family
#> 1 clayey, smectitic, thermic, shallow vertic rhodoxeralfs
#>                                                 taxclname           taxonname
#> 1 clayey, smectitic, thermic, shallow vertic rhodoxeralfs vertic rhodoxeralfs
#>   subgroup_code code                        class_string classes_split
#> 1          JDEB JDEB clayey, smectitic, thermic, shallow  clayey, ....
#>   taxpartsize taxpartsizemod taxminalogy taxceactcl taxreaction taxtempcl
#> 1      clayey             NA   smectitic         NA          NA   thermic
#>   taxfamhahatmatcl taxfamother           taxsubgrp  taxgrtgroup taxsuborder
#> 1               NA     shallow Vertic Rhodoxeralfs Rhodoxeralfs     Xeralfs
#>   taxorder
#> 1 Alfisols

@brownag brownag closed this as completed Nov 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
SoilWeb Related to the SoilWeb / UCDavis LAWR servers, Henry Mount DB, backend functionality and public API wontfix
Projects
None yet
Development

No branches or pull requests

2 participants