ropensci / taxize

A taxonomic toolbelt for R
https://docs.ropensci.org/taxize
Other
270 stars 61 forks source link

get_gbifid is case senstitive #868

Closed ocstringham closed 3 years ago

ocstringham commented 3 years ago

I was not expecting get_gbifid to be case sensitive. Is this by design?

Example: get_gbifid_("iguana") returns no results but get_gbifid_("Iguana") returns the Genus Iguana.

sckott commented 3 years ago

Thanks for the issue.

Its not taxize that's responsible for this, its GBIF

One option is to use method = "lookup" option, which uses the GBIF API route /species/search https://www.gbif.org/developer/species#searching rather than /species/match (the default option for method)

get_gbifid_("iguana", method = "lookup")

On the GBIF website it's not case sensitive, but they must use a different API route behind the scenes, which wouldn't be surprising.

ocstringham commented 3 years ago

Good to know, thank you for your response.

sckott commented 3 years ago

Sorry I don't have a better solution. I'm sure it's frustrating. It might be easier to use rgbif directly, https://docs.ropensci.org/rgbif/reference/name_backbone.html or https://docs.ropensci.org/rgbif/reference/name_lookup.html as I don't think we allow users to pass on any of the additional parameters that those API methods accept here

ocstringham commented 3 years ago

Thanks! No it's not bad at all. Most of my code is set up with taxize so luckily in this case all I have to do is capitalize.