Giter VIP home page Giter VIP logo

Comments (7)

keesey avatar keesey commented on June 2, 2024 1

PhyloPic makes parallel calls to a number of external databases (EoL, GBIF, OTOL, PBDB) -- it's fairly complex and asynchronous. The details are in here: https://github.com/keesey/phylopic/tree/main/packages/ui/src/search

This is done client-side rather than server-side to keep PhyloPic's operating costs down.

from rphylopic.

keesey avatar keesey commented on June 2, 2024 1

I forgot, I did document the general approach here: https://www.phylopic.org/articles/api-recipes#searching-name

from rphylopic.

willgearty avatar willgearty commented on June 2, 2024 1

I believe there are R packages that interface with all of those databases, although it might just be easier for us to query their APIs ourselves instead of depending on those extra packages.

from rphylopic.

keesey avatar keesey commented on June 2, 2024 1

Either way you'll still have to use the "Resolve Node" examples in the link above to translate results into the closest PhyloPic nodes.

from rphylopic.

keesey avatar keesey commented on June 2, 2024

Note that there's some kind of bug on that page right now where it's inserting build=NaN into the queries. I need to fix that for the "play" buttons to work. But the documentation should still be useful.

from rphylopic.

willgearty avatar willgearty commented on June 2, 2024

Plan:

resolve_phylopic(name, api = "paleobiodb.org", hierarchy = FALSE, n = 1)
  • name: the taxonomic name that should be searched in the external api (see here: https://www.phylopic.org/articles/api-recipes#searching-name)
  • api: the name of the external api/website (looks like phylopic supports quite a few, see the /namespaces endpoint)
  • hierarchy: should the return be a single UUID (for the closest match from /resolve) or should we return a list (with a UUID for each taxonomic rank returned by the api)
  • n: the number of UUIDs to be returned (per rank if hierarchy = TRUE)

Some notes:

  • It looks like the /resolve endpoint returns the taxon UUID and a single image UUID, so if n>1 we will need to get the image UUIDs on our own

from rphylopic.

willgearty avatar willgearty commented on June 2, 2024

I've started this on the resolve_phylopic branch

from rphylopic.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.