palaeoverse / rphylopic

Get Silhouettes of Organisms from PhyloPic
https://rphylopic.palaeoverse.org
GNU General Public License v3.0
91 stars 9 forks source link

Add attribution option to plotting functions #79

Closed willgearty closed 1 year ago

willgearty commented 1 year ago

This adds the verbose argument to our three plotting functions (geom_phylopic, add_phylopic, and add_phylopic_base) that outputs the get_attribution text for the silhouettes used. If the name aesthetic/argument is used in these functions (implying the user doesn't have a list of uuids or image objects in their environment), a warning is printed if verbose is not set to TRUE.

Fixes #71.

keesey commented 1 year ago

Any thoughts about utilizing the /collections endpoints on PhyloPic for attribution? You can link to pages like these: https://www.phylopic.org/collections/39f27cb5-5952-01d2-002a-0721a815ac14

There is also a way to turn those into permalinks, although I still need to document that for public usage.

willgearty commented 1 year ago

@keesey Ah, I had always thought you needed to create collections in the web portal, but I see now you can generate them with the API. I'll look into incorporating that!

willgearty commented 1 year ago

@keesey Are collection uuids essentially permalinks? In other words, will a collections/ URL always include the same list of images?

willgearty commented 1 year ago

I think it's once per facet/panel for geom_phylopic? I figured this was fine because often you list separate captions for each facet/panel of a figure anyways?

LewisAJones commented 1 year ago

I think it's once per facet/panel for geom_phylopic? I figured this was fine because often you list separate captions for each facet/panel of a figure anyways?

Maybe? I can just imagine a situation where you have many facets and you flood the console (like our LBG paper for example).

willgearty commented 1 year ago

Hmm...that might require a complete refactoring of GeomPhylopic, then. We currently process the names/uuids/imgs on a per-panel basis (this is pretty standard for geoms), so we would need to move all of this processing to a different step of the geom construction process. I'll look into it...

LewisAJones commented 1 year ago

Hmm...that might require a complete refactoring of GeomPhylopic, then. We currently process the names/uuids/imgs on a per-panel basis (this is pretty standard for geoms), so we would need to move all of this processing to a different step of the geom construction process. I'll look into it...

Sounds like an update for a later version. Happy with moving forward as is!

willgearty commented 1 year ago

I decided to go ahead and make the change anyways. Let me know what you think @LewisAJones!

keesey commented 1 year ago

@keesey Are collection uuids essentially permalinks? In other words, will a collections/ URL always include the same list of images?

It will always include the same list of UUIDs, but it's always possible that images will be removed or details changed. (Although both of those are quite infrequent.) Collections can be turned into actual permalinks, which will never change, but I haven't moved that to the general API yet. (Not sure when I'll have bandwidth.)