Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://junqueiragaabi.github.io/ButterflyColors/
Color palette for data visualization based on butterfly species
https://junqueiragaabi.github.io/ButterflyColors/
butterfly color-palette insects plot r rstats
Last synced: 3 days ago
JSON representation
Color palette for data visualization based on butterfly species
- Host: GitHub
- URL: https://junqueiragaabi.github.io/ButterflyColors/
- Owner: junqueiragaabi
- License: gpl-3.0
- Created: 2022-12-21T20:41:35.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2022-12-28T15:46:42.000Z (almost 2 years ago)
- Last Synced: 2024-08-03T23:24:21.073Z (3 months ago)
- Topics: butterfly, color-palette, insects, plot, r, rstats
- Language: R
- Homepage: https://junqueiragaabi.github.io/ButterflyColors/
- Size: 18.9 MB
- Stars: 10
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# **ButterflyColors**
[![License](https://img.shields.io/badge/license-GPL-blueviolet.svg?style=flat)](https://github.com/junqueiragaabi/ButterflyColors/blob/master/LICENSE.md)
[![Twitter Follow](https://img.shields.io/twitter/follow/junqueiragaabi?style=social)](https://twitter.com/junqueiragaabi)## Overview
The ButterflyColors package contains color palette for plotting in R based on butterfly species.
For species with sexual dimorphisms, we used male colors.## Installation
You can install the development version of ButterflyColors from [GitHub](https://github.com/) with:
``` r
# install.packages("devtools")
devtools::install_github("junqueiragaabi/ButterflyColors")
library(ButterflyColors)
```
## The color scalesButterfly palettes were extected from photographs using Adobe Color. We defined the five dominant colors in each butterfly species.
All photographs used were taken by Sofia Schirmer from biological collections of Brazilian universities.## Usage
The color palettes per species are organized in a list called butterfly_species:
``` r
library(ButterflyColors)
names(butterfly_species)
```
## [1] "philaethria_dido" "anteos_menippe" "fountainea_ryphea"
## [4] "lycorea_hallia" "morpho_helenor" "archaeoprepona_demophon_thalpius"
## [7] "brassolis_sophorae" "historis_acheronta" "stalachtis_phlegia_susanna"
## [10] "battus_polydamas" "anteos_clorinde" "chorinea_licursis"
## [13] "danaus_eresimus" "smyrna_blomfidiana" "astraptes_fulgerator"
## [16] "hamadryas_feronia" "pseudolycaena_marsyas" "catagramma_pygas"
## [19] "heliconius_sara_apseudes" "synargis_calyce" "hamadryas_feronia"
## [22] "heliconius_erato_phyllis" "hylephila_phyleus" "danaus_erippus"
## [25] "danaus_gilippus" "junonia_evarete" "hemiargus_hanno"
## [28] "dynamine_postverta" "parides_zacynthus_polymetus" "marpesia_petreus"and the function `butterfly_palettes` returns a vector with the color palette (hex color codes) of a butterfly.
``` r
butterfly_palettes(specie = "parides_zacynthus_polymetus")```
## [1] "#37738D" "#9B8170" "#D98B79" "#BF6860" "#292325"A few examples...
```r
library(ggplot2)ggplot(iris, aes(x = Sepal.Length, y = Petal.Length, colour = Species)) +
geom_point(size = 3) +
scale_colour_manual(values = butterfly_palettes("parides_zacynthus_polymetus"))
```### *Fountainea ryphea*
### *Archaeoprepona demophon thalpius*
### *Anteos menippe*
## Contribute
Can't find the species you want?
If you would like to contribute to this package, please contact [Gabriela Junqueira](https://twitter.com/junqueiragaabi)
or [Sofia Schirmer](https://twitter.com/xixirmer) on Twitter or submit a pull request## Credits
The structure of this package was inspired by the [`feathers`](https://github.com/shandiya/feathers) and [`fishualize`](https://github.com/nschiett/fishualize) packages.