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

Add common name check in the pull code #64

Open
chantelwetzel-noaa opened this issue Apr 22, 2022 · 5 comments
Open

Add common name check in the pull code #64

chantelwetzel-noaa opened this issue Apr 22, 2022 · 5 comments

Comments

@chantelwetzel-noaa
Copy link
Contributor

It is often unclear to users how common species names should be formatted to pull and return data of interest. Creating a function that correct incorrect capitalization (Dover sole vs. dover sole vs Dover Sole) would make pulling data easier for users.

@Curt-Whitmire-NOAA
Copy link

In the past, we've discussed exposing a table of names (common, scientific) in the Data Warehouse as an additional metadata table. That likely won't solve every issue (e.g., users not looking at the metadata) so perhaps integrating some fuzzy logic would also help.

@chantelwetzel-noaa
Copy link
Contributor Author

@kellijohnson-NOAA has integrated some code into the package creating a table of species information in the GetSpp.fn function. My thought is to apply the information created by this function in an internal check for function common name/scientific name input by the user where if a user specifies:

PullCatch.fn(Name = "dover sole", SurveyName = "NWFSC.Combo")

the function would internally correct the Name input to "Dover sole". Should be fairly simple based on existing functionality for species that are commonly used by the NWFSC.

@Curt-Whitmire-NOAA
Copy link

Ahh right, I had forgotten about the GetSpp.fn. Sounds like a good plan.

@kellijohnson-NOAA
Copy link
Contributor

@chantelwetzel-noaa do you want to just to tolower() and grep() as a check to make sure that the common name exists and then when a match is found assign the match rather than the user input? I can easily create this if you want.

@chantelwetzel-noaa
Copy link
Contributor Author

Yes. This is something that has been on my to-do list. Is that approach you are considering is to use tolower() to match a column in the saved csv files with all observed species names to ensure a correct name is passed? The only minor issue that I have encountered when using a similar approach on other projects is for species that have joint species names (e.g., vermilion/sunset rockfish) that can return multiple matches. However, I think this can probably be easily dealt with inside a function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants