ropensci / rfishbase

R interface to the fishbase.org database
https://docs.ropensci.org/rfishbase
111 stars 40 forks source link

Access "Species Ecology Matrix" through rfishbase #169

Closed BenMFord closed 1 year ago

BenMFord commented 5 years ago

Hello,

Is there a way to access the FishBase "Species Ecology Matrix" through rfishbase?

i.e. for Scarids - https://www.fishbase.se/report/KeyFactsMatrixList.php?famcode=364

Thanks

sckott commented 5 years ago

looks like the /matrix API route has that data e.g. https://fishbase.ropensci.org/matrix/?SpecCode=5537 - but we don't have a fxn for that in this pkg @cboettig - should we add a fxn for matrix?

cboettig commented 5 years ago

@sckott good call. Meanwhile, users can generate the endpoint automatically with the internal endpoint function factory:

e.g.

ecology_matrix <- rfishbase:::endpoint("matrix")
ecology_matrix()
sckott commented 5 years ago

nice one, had forgotten about that

BenMFord commented 5 years ago

Thank you very much!