ropensci / traits

R package for accessing species trait data from multiple databases
Other
39 stars 14 forks source link

EOL pageid #109

Closed maelle closed 5 years ago

maelle commented 5 years ago

How does one get it?

sckott commented 5 years ago

oof, EOL is kind of weird setup in my opinion. So species in EOL have page ids instead of taxon IDs, though I guess they're just different names. Can get one like

x = get_eolid('Quercus lobata', rows = 1)
attr(x, "uri")
#> [1] "http://eol.org/pages/1151479/overview"
stringr::str_extract(attr(x, "uri"), "[0-9]+")
#> [1] "1151479"

the ID you get from get_eolid is the taxon id, but the page id is in the uri attribute, so we can extract that page id. I opened an issue in taxize to put page id as a separate attribute so it can be extracted easier: https://github.com/ropensci/taxize/issues/702

maelle commented 5 years ago

Thanks!

sckott commented 5 years ago

no longer needed here since EOL Traitbank has changed their search interface