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

Incorporate NBN functionality #332

Closed
sckott opened this issue Sep 4, 2014 · 9 comments
Closed

Incorporate NBN functionality #332

sckott opened this issue Sep 4, 2014 · 9 comments
Milestone

Comments

@sckott
Copy link
Contributor

sckott commented Sep 4, 2014

related to discussion in ropensci-archive/rnbn#1

@sckott
Copy link
Contributor Author

sckott commented Sep 4, 2014

@AugustT is there an NBN API endpoint for searching for taxa? Sort of need that to be able to incorporate.

@sckott
Copy link
Contributor Author

sckott commented Sep 5, 2014

@AugustT
Copy link

AugustT commented Sep 5, 2014

Yes, and this is what is used by getTVKQuery in rNBN.

For example:

https://data.nbn.org.uk/api/search/taxa?q=blackbird

The API attempts an intelligent search with the most likely hit at the top. Also note that there are TVKs (taxon version keys) and pTVKs (preferred taxon version keys). For example:

https://data.nbn.org.uk/api/search/taxa?q=Eurasian%20Badger

The TVK and pTVK are different. The TVK is for 'Eurasian badger' but the pTVK is for 'Meles meles'. The occurrence records for our badger will be best found by using this pTVK.

@sckott
Copy link
Contributor Author

sckott commented Sep 5, 2014

hey @AugustT

thanks very much. We only give one ID per provider. Which ID (TVK or pTVK) would we give? Is the pTVK always for the scientific name?

@AugustT
Copy link

AugustT commented Sep 8, 2014

@sckott I see....

I think if you are only returning one ID you would go for the pTVK of the top result as this is most likely to be what people are after.

Clearly this might raise some issues. For example 'Robin' will get you the ID for European robin (but you might think it is the American Robin), and 'Peacock' will get you the butterfly rather than the bird, however it might be that with taxize you expect the user to be wise to these sorts of issues. I think you are right that all pTVKs are for the latin name.

I also note that taxize does some taxonomic hierarchy type stuff, there is an API for that on the NBN:

https://data.nbn.org.uk/Documentation/Web_Services/Web_Services-REST/resources/restapi/resource_TaxonResource.html#path__taxa_-taxonVersionKey-_taxonomy.html

For example: https://data.nbn.org.uk/api/taxa/NHMSYS0000502940/taxonomy

Likewise there is an API for synonyms: https://data.nbn.org.uk/Documentation/Web_Services/Web_Services-REST/resources/restapi/resource_TaxonResource.html#path__taxa_-taxonVersionKey-_synonyms.html

Hope this helps,

Tom

For example: https://data.nbn.org.uk/api/taxa/NHMSYS0000502940/synonyms

@sckott
Copy link
Contributor Author

sckott commented Sep 8, 2014

@AugustT Thanks for the info. pTVKs sounds good to give back then. I'll see if there's a robust way to include the other ID optionally

Right, classification() is a single interface to any taxonomic service that provides hierarchy data. I'll include a method for that too.

Great, synonyms as well, perfect.

At this point we may want to just use your rnbn as a dependency, but I'm trying to avoid adding more dependency packges.

@sckott sckott modified the milestone: v0.5 Sep 8, 2014
@AugustT
Copy link

AugustT commented Sep 9, 2014

@sckott I agree that you want to avoid dependencies as much as possible. I'm happy for you to take code from within rNBN and include it within taxise. Happy to help if needed.

Also I'm pretty sure this API calls don't require login so that should make your life a lot easier!

@sckott
Copy link
Contributor Author

sckott commented Sep 9, 2014

that's great, forgot about login. Glad we don't have to do that!

sckott added a commit that referenced this issue Oct 1, 2014
sckott added a commit that referenced this issue Oct 1, 2014
sckott added a commit that referenced this issue Oct 2, 2014
@sckott sckott changed the title Incorporate just taxon IDs from NBN Incorporate NBN functionality Oct 2, 2014
@sckott sckott closed this as completed in d4fe8a4 Oct 2, 2014
@sckott
Copy link
Contributor Author

sckott commented Oct 2, 2014

@AugustT okay, added

  • nbn_search()
  • nbn_classification() & available from classification()
  • nbn_synonyms() & available from synonyms()
  • get_nbnid()

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

2 participants