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 filter argument #78

Closed LewisAJones closed 1 year ago

LewisAJones commented 1 year ago

This PR enables users to filter image silhouettes/uuids by desired license (get_uuid and pick_phylo). There are three filtering options for licenses, but in reality there are six options as each of these can be true or false:

I've currently implemented this to use the "false" option for filtering as these seem to me what users would want. For example, I can't imagine users wanting to filter to images that do not allow commercial usage. Let me know what you think as this is certainly a little opinionated! As implemented, I think it is quite intuitive. If we do want to use true and false options, we might need to either add arguments for each filtering or have the user input a name list to filter.

willgearty commented 1 year ago

Should this argument be added to the add and geom functions for when users use the name argument there? Or if people are truly concerned about licenses should they just be using get_uuid and pick_phylo anyways?

LewisAJones commented 1 year ago

Should this argument be added to the add and geom functions for when users use the name argument there? Or if people are truly concerned about licenses should they just be using get_uuid and pick_phylo anyways?

Yes, I think so. I imagine a lot of users will skip straight to add and geom functions.

willgearty commented 1 year ago

This works great, thanks @LewisAJones! I've fixed up a few things and added the filter argument to add_phylopic and geom_phylopic. Give it a try and let me know what you think.

LewisAJones commented 1 year ago

Looks good to go on my end, great job @willgearty. Merge?