ncss-tech/SoilTaxonomy

Helper function for converting data to NASIS (or other schema) columns

brownag opened this issue · 2 comments

I chose to use family subgroup greatgroup suborder and order in SoilTaxonomy early on because it was at the time not NASIS specific, and those names map directly to concepts without weird abbreviation inconsistencies. There was a deliberate change to replace soilorder with order when I created the R package.

New tools e.g. parse_family() allow conversion of a family name to a data.frame with all the awkward NASIS physical column names filled out.

  • split up the logic in parse_family to ensure the remapping functionality could operate on just subgroup or higher level components
  • add a function for setting ordered factors for data.frame like object (w/ [[ methods), like @dylanbeaudette has implemented in sharpshootR::SoilTaxonomyDendrogram(); this is a good feature and we should come up with one standard way of doing it (added SoilTaxonomyLevels() in #39)
  • possibly? come up with a way to accommodate other non-NASIS schemas

PR with sample code for item number 2 in : ncss-tech/sharpshootR#45

Conversion to/from names used to describe levels of ST is a good idea. Also, allowing names in data sources to be set via argument is probably important.