rphylopic

Get Silhouettes of Organisms from PhyloPic

https://github.com/palaeoverse/rphylopic

Science Score: 39.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 1 DOI reference(s) in README
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (15.7%) to scientific vocabulary

Keywords

base-r ggplot2 phylopic rstats silhouette
Last synced: 4 months ago · JSON representation

Repository

Get Silhouettes of Organisms from PhyloPic

Basic Info
Statistics
  • Stars: 95
  • Watchers: 7
  • Forks: 13
  • Open Issues: 13
  • Releases: 11
Topics
base-r ggplot2 phylopic rstats silhouette
Created over 12 years ago · Last pushed 4 months ago
Metadata Files
Readme Changelog Contributing License Code of conduct Codemeta

README.md

rphylopic

R-CMD-check codecov CRAN status CRAN downloads Twitter URL <!-- badges: end -->

The purpose of the rphylopic package is to allow users to add silhouettes of organisms to plots generated in base R and ggplot2. To do so, it uses silhouettes made available via the PhyloPic website.

rphylopic was originally developed and maintained by Scott Chamberlain. From ver. 1.0.0, the package is now developed and maintained by William Gearty and Lewis A. Jones from the Palaeoverse team.

Installation

The stable version of rphylopic can be installed from CRAN using:

r install.packages("rphylopic")

The development version of rphylopic can be installed via GitHub using:

r install.packages("remotes") remotes::install_github("palaeoverse/rphylopic")

How does it work?

Get an image uuid

```r

Load rphylopic

library(rphylopic)

Get a single image uuid for a species

uuid <- get_uuid(name = "Canis lupus", n = 1)

Get the image for that uuid

img <- get_phylopic(uuid = uuid)

But multiple silhouettes can exist per species...

uuid <- get_uuid(name = "Canis lupus", n = 5) ```

Pick an image

```r

How do I pick?!

It's difficult without seeing the image itself, let's use:

img <- pick_phylopic(name = "Canis lupus", n = 5) ```

Plot an image

Base R

```r

OK, now we've got the image we want... let's add it to a plot!

plot(x = 1, y = 1, type = "n") addphylopicbase(img = img, x = 1.25, y = 1.25, height = 0.25)

But can't we just add an image straight away using the uuid? Sure!

uuid <- getuuid(name = "Canis lupus", n = 1) addphylopic_base(uuid = uuid, x = 1, y = 1, height = 0.25)

What about just using the first image linked to the name? Definitely!

addphylopicbase(name = "Canis lupus", x = 0.75, y = 0.75, height = 0.25)

Black is a bit boring? OK...

addphylopicbase(name = "Canis lupus", x = 0.75, y = 1.25, height = 0.25, color = "orange") ```

ggplot2

```r

All of this functionality is available for ggplot2 as well...

But we use addphylopic and geomphylopic instead!

library(ggplot2)

Get image

uuid <- getuuid(name = "Iris", n = 1) img <- getphylopic(uuid = uuid)

Put a silhouette behind a plot

ggplot(iris) + addphylopic(x = 6.1, y = 3.2, img = img, alpha = 0.2) + geompoint(aes(x = Sepal.Length, y = Sepal.Width))

Plot silhouettes as points!

ggplot(iris) + geom_phylopic(aes(x = Sepal.Length, y = Sepal.Width), img = img, color = "purple", height = 0.25) ```

Get attribution

```r

PhyloPic has a lot of contributors and we should acknowledge

their work. You can get data about images using get_attribution

Get valid uuid

uuid <- get_uuid(name = "Nycticebus")

Get attribution data for uuid

get_attribution(uuid = uuid) ```

Save an image

```r

How do I save an image?

Get image

img <- pick_phylopic(name = "Phascolarctos cinereus", n = 1)

Save image

save_phylopic(img = img) ```

How to contribute?

If you are interested in contributing to the rphylopic R package, you can do so by following these guidelines.

Code of Conduct

As with any community project, society, or meeting we feel it is important to established some expectations of behaviour. Please read our code of conduct, and reach out if you ever face any issues. Everyone has the right to live and work in a harassment-free environment.

Attribution

If you use the rphylopic package in your work, please acknowledge the contributors responsible for the image, acknowledge the creator of PhyloPic (Michael Keesey), and cite the following for rphylopic:

Gearty, W. and Jones, L.A. 2023. rphylopic: An R package for fetching, transforming, and visualising PhyloPic silhouettes. Methods in Ecology and Evolution, 14(11), 2700-2708. doi: 10.1111/2041-210X.14221.

Cheat sheet

Hex logo and cheatsheet by Miranta Kouvari

Owner

  • Name: Palaeoverse
  • Login: palaeoverse
  • Kind: organization
  • Email: LewisA.Jones@outlook.com

A Resource Hub for Palaeobiologists

CodeMeta (codemeta.json)

{
  "@context": "https://doi.org/10.5063/schema/codemeta-2.0",
  "@type": "SoftwareSourceCode",
  "identifier": "rphylopic",
  "description": "Work with the PhyloPic Web Service (<http://api-docs.phylopic.org/v2/>) to fetch silhouette images of organisms. Includes functions for adding silhouettes to both base R plots and ggplot2 plots.",
  "name": "rphylopic: Get Silhouettes of Organisms from PhyloPic",
  "relatedLink": [
    "https://rphylopic.palaeoverse.org",
    "https://palaeoverse.org",
    "https://CRAN.R-project.org/package=rphylopic"
  ],
  "codeRepository": "https://github.com/palaeoverse-community/rphylopic",
  "issueTracker": "https://github.com/palaeoverse-community/rphylopic/issues",
  "license": "https://spdx.org/licenses/GPL-3.0",
  "version": "1.2.2.9000",
  "programmingLanguage": {
    "@type": "ComputerLanguage",
    "name": "R",
    "url": "https://r-project.org"
  },
  "runtimePlatform": "R version 4.3.1 (2023-06-16 ucrt)",
  "provider": {
    "@id": "https://cran.r-project.org",
    "@type": "Organization",
    "name": "Comprehensive R Archive Network (CRAN)",
    "url": "https://cran.r-project.org"
  },
  "author": [
    {
      "@type": "Person",
      "givenName": "William",
      "familyName": "Gearty",
      "email": "willgearty@gmail.com",
      "@id": "https://orcid.org/0000-0003-0076-3262"
    },
    {
      "@type": "Person",
      "givenName": "Lewis A.",
      "familyName": "Jones",
      "email": "LewisAlan.Jones@uvigo.es",
      "@id": "https://orcid.org/0000-0003-3902-8986"
    },
    {
      "@type": "Person",
      "givenName": "Scott",
      "familyName": "Chamberlain",
      "email": "myrmecocystus@gmail.com",
      "@id": "https://orcid.org/0000-0003-1444-9135"
    }
  ],
  "contributor": [
    {
      "@type": "Person",
      "givenName": "David",
      "familyName": "Miller",
      "email": "dave@ninepointeightone.net"
    }
  ],
  "maintainer": [
    {
      "@type": "Person",
      "givenName": "William",
      "familyName": "Gearty",
      "email": "willgearty@gmail.com",
      "@id": "https://orcid.org/0000-0003-0076-3262"
    }
  ],
  "softwareSuggestions": [
    {
      "@type": "SoftwareApplication",
      "identifier": "testthat",
      "name": "testthat",
      "version": ">= 3.0.0",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=testthat"
    },
    {
      "@type": "SoftwareApplication",
      "identifier": "vdiffr",
      "name": "vdiffr",
      "version": ">= 1.0.0",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=vdiffr"
    },
    {
      "@type": "SoftwareApplication",
      "identifier": "rmarkdown",
      "name": "rmarkdown",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=rmarkdown"
    },
    {
      "@type": "SoftwareApplication",
      "identifier": "covr",
      "name": "covr",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=covr"
    },
    {
      "@type": "SoftwareApplication",
      "identifier": "phytools",
      "name": "phytools",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=phytools"
    },
    {
      "@type": "SoftwareApplication",
      "identifier": "palaeoverse",
      "name": "palaeoverse",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=palaeoverse"
    },
    {
      "@type": "SoftwareApplication",
      "identifier": "ggtree",
      "name": "ggtree",
      "provider": {
        "@id": "https://www.bioconductor.org",
        "@type": "Organization",
        "name": "Bioconductor",
        "url": "https://www.bioconductor.org"
      },
      "sameAs": "https://bioconductor.org/packages/release/bioc/html/ggtree.html"
    },
    {
      "@type": "SoftwareApplication",
      "identifier": "ape",
      "name": "ape",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=ape"
    },
    {
      "@type": "SoftwareApplication",
      "identifier": "deeptime",
      "name": "deeptime",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=deeptime"
    },
    {
      "@type": "SoftwareApplication",
      "identifier": "palmerpenguins",
      "name": "palmerpenguins",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=palmerpenguins"
    },
    {
      "@type": "SoftwareApplication",
      "identifier": "maps",
      "name": "maps",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=maps"
    }
  ],
  "softwareRequirements": {
    "1": {
      "@type": "SoftwareApplication",
      "identifier": "R",
      "name": "R",
      "version": ">= 4.0"
    },
    "2": {
      "@type": "SoftwareApplication",
      "identifier": "ggplot2",
      "name": "ggplot2",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=ggplot2"
    },
    "3": {
      "@type": "SoftwareApplication",
      "identifier": "jsonlite",
      "name": "jsonlite",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=jsonlite"
    },
    "4": {
      "@type": "SoftwareApplication",
      "identifier": "grid",
      "name": "grid"
    },
    "5": {
      "@type": "SoftwareApplication",
      "identifier": "graphics",
      "name": "graphics"
    },
    "6": {
      "@type": "SoftwareApplication",
      "identifier": "png",
      "name": "png",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=png"
    },
    "7": {
      "@type": "SoftwareApplication",
      "identifier": "grImport2",
      "name": "grImport2",
      "version": ">= 0.3.0",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=grImport2"
    },
    "8": {
      "@type": "SoftwareApplication",
      "identifier": "rsvg",
      "name": "rsvg",
      "version": ">= 2.6.0",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=rsvg"
    },
    "9": {
      "@type": "SoftwareApplication",
      "identifier": "httr",
      "name": "httr",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=httr"
    },
    "10": {
      "@type": "SoftwareApplication",
      "identifier": "curl",
      "name": "curl",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=curl"
    },
    "11": {
      "@type": "SoftwareApplication",
      "identifier": "methods",
      "name": "methods"
    },
    "12": {
      "@type": "SoftwareApplication",
      "identifier": "lifecycle",
      "name": "lifecycle",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=lifecycle"
    },
    "13": {
      "@type": "SoftwareApplication",
      "identifier": "pbapply",
      "name": "pbapply",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=pbapply"
    },
    "14": {
      "@type": "SoftwareApplication",
      "identifier": "knitr",
      "name": "knitr",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=knitr"
    },
    "SystemRequirements": null
  },
  "fileSize": "5462.059KB",
  "citation": [
    {
      "@type": "ScholarlyArticle",
      "datePublished": "2023",
      "author": [
        {
          "@type": "Person",
          "givenName": "William",
          "familyName": "Gearty"
        },
        {
          "@type": "Person",
          "givenName": [
            "Lewis",
            "A."
          ],
          "familyName": "Jones"
        }
      ],
      "name": "rphylopic: An R package for fetching, transforming, and visualising PhyloPic silhouettes",
      "identifier": "10.1111/2041-210X.14221",
      "pagination": "2700-2708",
      "@id": "https://doi.org/10.1111/2041-210X.14221",
      "sameAs": "https://doi.org/10.1111/2041-210X.14221",
      "isPartOf": {
        "@type": "PublicationIssue",
        "issueNumber": "11",
        "datePublished": "2023",
        "isPartOf": {
          "@type": [
            "PublicationVolume",
            "Periodical"
          ],
          "volumeNumber": "14",
          "name": "Methods in Ecology and Evolution"
        }
      }
    }
  ],
  "releaseNotes": "https://github.com/palaeoverse-community/rphylopic/blob/master/NEWS.md",
  "readme": "https://github.com/palaeoverse-community/rphylopic/blob/main/README.md",
  "contIntegration": [
    "https://github.com/palaeoverse-community/rphylopic/actions/workflows/R-CMD-check.yaml",
    "https://app.codecov.io/gh/palaeoverse-community/rphylopic"
  ],
  "keywords": [
    "phylopic",
    "rstats",
    "silhouette",
    "ggplot2",
    "base-r"
  ]
}

GitHub Events

Total
  • Issues event: 5
  • Watch event: 5
  • Issue comment event: 15
  • Push event: 15
  • Pull request review event: 7
  • Pull request review comment event: 12
  • Pull request event: 6
  • Fork event: 2
  • Create event: 1
Last Year
  • Issues event: 5
  • Watch event: 5
  • Issue comment event: 15
  • Push event: 15
  • Pull request review event: 7
  • Pull request review comment event: 12
  • Pull request event: 6
  • Fork event: 2
  • Create event: 1

Issues and Pull Requests

Last synced: 4 months ago

All Time
  • Total issues: 1
  • Total pull requests: 1
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Total issue authors: 1
  • Total pull request authors: 1
  • Average comments per issue: 0.0
  • Average comments per pull request: 0.0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 1
  • Pull requests: 1
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 1
  • Pull request authors: 1
  • Average comments per issue: 0.0
  • Average comments per pull request: 0.0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • willgearty (10)
  • megaraptor1 (1)
  • rasmus87 (1)
  • tungxphung (1)
Pull Request Authors
  • willgearty (3)
  • LewisAJones (2)
  • ms609 (2)
Top Labels
Issue Labels
bug (5) feature-request (2)
Pull Request Labels
feature-request (3) bug (1)

Dependencies

DESCRIPTION cran
  • crul >= 0.5.2 imports
  • ggplot2 * imports
  • graphics * imports
  • grid * imports
  • gridBase * imports
  • jsonlite * imports
  • png * imports
  • R.rsp * suggests
  • data.table * suggests
  • knitr * suggests
  • parallel * suggests
  • rmarkdown * suggests
  • testthat * suggests
  • vcr >= 0.2.0 suggests
.github/workflows/R-CMD-check.yaml actions
  • actions/checkout v3 composite
  • r-lib/actions/check-r-package v2 composite
  • r-lib/actions/setup-pandoc v2 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite
.github/workflows/lint.yaml actions
  • actions/checkout v3 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite
.github/workflows/pkgdown.yaml actions
  • JamesIves/github-pages-deploy-action v4.4.1 composite
  • actions/checkout v3 composite
  • r-lib/actions/setup-pandoc v2 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite
.github/workflows/pr-commands.yaml actions
  • actions/checkout v3 composite
  • r-lib/actions/pr-fetch v2 composite
  • r-lib/actions/pr-push v2 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite
.github/workflows/test-coverage.yaml actions
  • actions/checkout v3 composite
  • actions/upload-artifact v3 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite