-
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
areaacres & obterm in get_soilseries_from_NASIS(), and use of areasymbol generally #272
Comments
I think item 1 is not that misleading as the areasymbol, areatypename etc. are all together and are corresponding to the "State or Territory" in the query result. I can definitely see needing to disambiguate if multiple areatypename were used in the same query. Granted that information is not particularly useful for soil series overlap... the fact that those new columns were included was probably an oversight from #188 which added several columns that were not present in the result for consistency. I don't think there was a specific need for the
This seems like a fine suggestion in terms of identifying related tables and the context associated with an area symbol or name. I don't think the "iidref" suffix is necessary considering this is a made up table/column physical name combination. More generally: changing column names would be a fairly large breaking change for basically all existing uses of the I don't really think this is a "big problem" in terms of people understanding NASIS (I have never had anyone contact me about it), but I would gladly review pull request(s) from you to implement these changes when you have time. Do you have an idea of how many/which functions you would expect to be impacted by this change? |
I think the original column name/iidref linkage (e.g. typelocstarea.areasymbol) better convenes the column purpose where it's used in various tables (like the project table). I agreed the iidref part isn't necessary. Also, in many instances the areaiidref column name isn't unique, even when it is elsewhere when referring to the same areatype. If we adopt this convention it'll make including the areatypename unnecessary. To be clear, at this time, I'm not advocating a wholesale change of all the functions that use areasymbol, but would recommend it moving forward. The one logical exception I can see is where the areasymbol is linked to the legend and mapunit (which would minimzie the majority of disruptions). Since we seem to be in agreement, perhaps we could start here. |
Agreed if we carve out an exception for legend/mapunit that probably would cover most use cases that would "break". I am open to a PR to implement this where you want, and we can start with get_soilseries_from_NASIS(), I think anything that is less ambiguous is a "good" change even if we have to fix things. A PR is the right place to test these changes while we work out the kinks. I can't help but think there are probably other instances beyond areaiidrefs where this idea could be implemented to make it less ambiguous where data come from when a query behind the scenes does something that involves joins or related tables with potentially ambiguous column names. I think you are advocating for a wholesale change--though I recognize you would like to focus on this function for now. In the big picture I would like to see a roadmap of sorts for where we plan to implement this new recommendation. A checklist of places to implement and sketch of the rules could be a good topic for either a new issue and/or for a section in the "soilDB developers guide" (#269; which I would appreciate your help in drafting) I think there might be some other things to consider when you have child tables referencing area that have many:1 relationship with the parent... examples relevant to |
Sounds good. I'd be interested to discuss the developer guide more. |
- #272 - thanks to Zach Van Abbema for suggestion
Initial implementation of above for:
I started to look at get_projectmapunit_from_NASIS() and a few other cases, but have not implemented it there yet. For project it would be |
I noticed a couple of issues with the get_soilseries_from_NASIS() function today.
Cheers
The text was updated successfully, but these errors were encountered: