From 6aae9d2ac5efe249d88776aa966e0e44281e0a5e Mon Sep 17 00:00:00 2001 From: Emil Hvitfeldt Date: Tue, 10 Jul 2018 23:54:48 -0700 Subject: [PATCH] update readme page for cran release --- README.Rmd | 12 ++-- README.md | 163 +++++++++++++++++++++++++++++++++-------------------- 2 files changed, 109 insertions(+), 66 deletions(-) diff --git a/README.Rmd b/README.Rmd index 23baeb0..3483d88 100644 --- a/README.Rmd +++ b/README.Rmd @@ -15,26 +15,22 @@ knitr::opts_chunk$set( # paletteer [![Travis build status](https://travis-ci.org/EmilHvitfeldt/paletteer.svg?branch=master)](https://travis-ci.org/EmilHvitfeldt/paletteer) -[![Coverage status](https://codecov.io/gh/EmilHvitfeldt/paletteer/branch/master/graph/badge.svg)](https://codecov.io/github/EmilHvitfeldt/paletteer?branch=master) [![AppVeyor build status](https://ci.appveyor.com/api/projects/status/github/EmilHvitfeldt/paletteer?branch=master&svg=true)](https://ci.appveyor.com/project/EmilHvitfeldt/paletteer) - +[![Coverage status](https://codecov.io/gh/EmilHvitfeldt/paletteer/branch/master/graph/badge.svg)](https://codecov.io/github/EmilHvitfeldt/paletteer?branch=master) The goal of paletteer is to be a comprehensize collection of color palettes in R using a common interface. Think of it as the "caret of palettes". ## Installation - -the package is not yet on CRAN but ff you want the development version then install directly from GitHub: +If you want the development version instead then install directly from GitHub: ```{r, eval=FALSE} # install.packages("devtools") @@ -115,6 +111,10 @@ ggplot(iris, aes(Sepal.Length, Sepal.Width, color = Species)) + scale_color_paletteer_d(nord, aurora) ``` +## Special thanks + +- [Hadley Wickham](https://github.com/hadley) For helpful code improvements. + ## Included packages paletteer incldues palettes from the following packages: diff --git a/README.md b/README.md index 8c05ac9..65c41eb 100644 --- a/README.md +++ b/README.md @@ -1,53 +1,69 @@ -paletteer -========================================================== -[![Travis build status](https://travis-ci.org/EmilHvitfeldt/paletteer.svg?branch=master)](https://travis-ci.org/EmilHvitfeldt/paletteer) [![Coverage status](https://codecov.io/gh/EmilHvitfeldt/paletteer/branch/master/graph/badge.svg)](https://codecov.io/github/EmilHvitfeldt/paletteer?branch=master) [![AppVeyor build status](https://ci.appveyor.com/api/projects/status/github/EmilHvitfeldt/paletteer?branch=master&svg=true)](https://ci.appveyor.com/project/EmilHvitfeldt/paletteer) +# paletteer -The goal of paletteer is to be a comprehensize collection of color palettes in R using a common interface. Think of it as the "caret of palettes". +[![Travis build +status](https://travis-ci.org/EmilHvitfeldt/paletteer.svg?branch=master)](https://travis-ci.org/EmilHvitfeldt/paletteer) +[![AppVeyor build +status](https://ci.appveyor.com/api/projects/status/github/EmilHvitfeldt/paletteer?branch=master&svg=true)](https://ci.appveyor.com/project/EmilHvitfeldt/paletteer) +[![CRAN +status](https://www.r-pkg.org/badges/version/paletteer)](https://cran.r-project.org/package=paletteer) +[![CRAN\_Download\_Badge](http://cranlogs.r-pkg.org/badges/paletteer)](https://CRAN.R-project.org/package=paletteer) +[![Coverage +status](https://codecov.io/gh/EmilHvitfeldt/paletteer/branch/master/graph/badge.svg)](https://codecov.io/github/EmilHvitfeldt/paletteer?branch=master) -Installation ------------- +The goal of paletteer is to be a comprehensize collection of color +palettes in R using a common interface. Think of it as the “caret of +palettes”. - -the package is not yet on CRAN but ff you want the development version then install directly from GitHub: + +If you want the development version instead then install directly from +GitHub: ``` r # install.packages("devtools") devtools::install_github("EmilHvitfeldt/paletteer") ``` -Palettes --------- +## Palettes -The palettes are divided into 2 groups; *discrete* and *continuous*. For discrete palette you have the choice between the *fixed width palettes* and *dynamic palettes*. Most common of the two are the fixed width palettes which have a set amount of colors which doesn't change when the number of colors requisted vary like the following palettes: +The palettes are divided into 2 groups; *discrete* and *continuous*. For +discrete palette you have the choice between the *fixed width palettes* +and *dynamic palettes*. Most common of the two are the fixed width +palettes which have a set amount of colors which doesn’t change when the +number of colors requisted vary like the following palettes: -![](man/figures/README-unnamed-chunk-2-1.png) +![](man/figures/README-unnamed-chunk-2-1.png) -on the other hand we have the dynamic palettes where the colors of the palette depend on the number of colors you need like the `green.pal` palette from the `cartography` package: +on the other hand we have the dynamic palettes where the colors of the +palette depend on the number of colors you need like the `green.pal` +palette from the `cartography` package: -![](man/figures/README-unnamed-chunk-3-1.png) +![](man/figures/README-unnamed-chunk-3-1.png) -Lastly we have the continuous palettes which provides as many colors as you need for a smooth transition of color: +Lastly we have the continuous palettes which provides as many colors as +you need for a smooth transition of color: -![](man/figures/README-unnamed-chunk-4-1.png) +![](man/figures/README-unnamed-chunk-4-1.png) -This package includes 958 from 28 different packages and information about these can be found in the following data.frames: `palettes_c_names`, `palettes_d_names` and `palettes_dynamic_names`. +This package includes 958 from 28 different packages and information +about these can be found in the following data.frames: +`palettes_c_names`, `palettes_d_names` and `palettes_dynamic_names`. -Examples --------- +## Examples -All the palettes can be accessed from the 3 functions `paletteer_c()`, `paletteer_d()` and `paletteer_dynamic()` using the package and palette arguments. +All the palettes can be accessed from the 3 functions `paletteer_c()`, +`paletteer_d()` and `paletteer_dynamic()` using the package and palette +arguments. ``` r paletteer_c(package = "scico", palette = "berlin", n = 10) @@ -59,7 +75,8 @@ paletteer_dynamic("cartography", "green.pal", 5) #> [1] "#B8D9A9" "#8DBC80" "#5D9D52" "#287A22" "#17692C" ``` -All of the functions also support symbol argument such that you don't have to put your names in quotes +All of the functions also support symbol argument such that you don’t +have to put your names in quotes ``` r paletteer_c(scico, berlin, 10) @@ -71,10 +88,10 @@ paletteer_dynamic(cartography, green.pal, 5) #> [1] "#B8D9A9" "#8DBC80" "#5D9D52" "#287A22" "#17692C" ``` -ggplot2 scales --------------- +## ggplot2 scales -Lastly the package also includes scales for `ggplot2` using the same standard interface +Lastly the package also includes scales for `ggplot2` using the same +standard interface ``` r library(ggplot2) @@ -84,38 +101,64 @@ ggplot(iris, aes(Sepal.Length, Sepal.Width, color = Species)) + scale_color_paletteer_d(nord, aurora) ``` -![](man/figures/README-unnamed-chunk-7-1.png) +![](man/figures/README-unnamed-chunk-7-1.png) + +## Special thanks + + - [Hadley Wickham](https://github.com/hadley) For helpful code + improvements. -Included packages ------------------ +## Included packages paletteer incldues palettes from the following packages: -- awtools [github](https://github.com/awhstin/awtools) -- cartography [github](https://github.com/riatelab/cartography) [CRAN](https://cran.r-project.org/web/packages/cartography/index.html) -- dichromat [CRAN](https://cran.r-project.org/web/packages/dichromat/index.html) -- dutchmasters [github](https://github.com/EdwinTh/dutchmasters) -- ggsci [github](https://github.com/road2stat/ggsci) [CRAN](https://cran.r-project.org/web/packages/ggsci/index.html) -- ggpomological [github](https://github.com/gadenbuie/ggpomological) -- ggthemes [github](https://github.com/jrnold/ggthemes) [CRAN](https://cran.r-project.org/web/packages/ggthemes/index.html) -- ghibli [github](https://github.com/ewenme/ghibli) [CRAN](https://cran.r-project.org/web/packages/ghibli/index.html) -- grDevices [CRAN](https://cran.r-project.org/web/packages/RGraphics/index.html) -- jcolors [github](https://github.com/jaredhuling/jcolors) [CRAN](https://cran.r-project.org/web/packages/jcolors/index.html) -- LaCroixColoR [github](https://github.com/johannesbjork/LaCroixColoR) -- NineteenEightyR [github](https://github.com/m-clark/NineteenEightyR) -- nord [github](https://github.com/jkaupp/nord) [CRAN](https://cran.r-project.org/web/packages/nord/index.html) -- oompaBase [CRAN](https://cran.r-project.org/web/packages/oompaBase/index.html) -- palettetown [github](https://github.com/timcdlucas/palettetown) [CRAN](https://cran.r-project.org/web/packages/palettetown/index.html) -- palr [github](https://github.com/AustralianAntarcticDivision/palr) [CRAN](https://cran.r-project.org/web/packages/palr/index.html) -- pals [github](https://github.com/kwstat/pals) [CRAN](https://cran.r-project.org/web/packages/pals/index.html) -- Polychrome [CRAN](https://cran.r-project.org/web/packages/Polychrome/index.html) -- quickpalette [github](https://github.com/EmilHvitfeldt/quickpalette) -- rcartocolor [github](https://github.com/Nowosad/rcartocolor) [CRAN](https://cran.r-project.org/web/packages/rcartocolor/index.html) -- RColorBrewer [CRAN](https://cran.r-project.org/web/packages/RColorBrewer/index.html) -- Redmonder [CRAN](https://cran.r-project.org/web/packages/Redmonder/index.html) -- RSkittleBrewer [github](https://github.com/alyssafrazee/RSkittleBrewer) -- scico [github](https://github.com/thomasp85/scico) [CRAN](https://cran.r-project.org/web/packages/scico/index.html) -- viridis [github](https://github.com/sjmgarnier/viridis) [CRAN](https://cran.r-project.org/web/packages/viridis/index.html) -- visibly [github](https://github.com/m-clark/visibly) [CRAN](https://cran.r-project.org/web/packages/visibly/index.html) -- wesanderson [github](https://github.com/karthik/wesanderson) [CRAN](https://cran.r-project.org/web/packages/wesanderson/index.html) -- yarrr [github](https://github.com/ndphillips/yarrr) [CRAN](https://cran.r-project.org/web/packages/yarrr/index.html) + - awtools [github](https://github.com/awhstin/awtools) + - cartography [github](https://github.com/riatelab/cartography) + [CRAN](https://cran.r-project.org/web/packages/cartography/index.html) + - dichromat + [CRAN](https://cran.r-project.org/web/packages/dichromat/index.html) + - dutchmasters [github](https://github.com/EdwinTh/dutchmasters) + - ggsci [github](https://github.com/road2stat/ggsci) + [CRAN](https://cran.r-project.org/web/packages/ggsci/index.html) + - ggpomological [github](https://github.com/gadenbuie/ggpomological) + - ggthemes [github](https://github.com/jrnold/ggthemes) + [CRAN](https://cran.r-project.org/web/packages/ggthemes/index.html) + - ghibli [github](https://github.com/ewenme/ghibli) + [CRAN](https://cran.r-project.org/web/packages/ghibli/index.html) + - grDevices + [CRAN](https://cran.r-project.org/web/packages/RGraphics/index.html) + - jcolors [github](https://github.com/jaredhuling/jcolors) + [CRAN](https://cran.r-project.org/web/packages/jcolors/index.html) + - LaCroixColoR [github](https://github.com/johannesbjork/LaCroixColoR) + - NineteenEightyR [github](https://github.com/m-clark/NineteenEightyR) + - nord [github](https://github.com/jkaupp/nord) + [CRAN](https://cran.r-project.org/web/packages/nord/index.html) + - oompaBase + [CRAN](https://cran.r-project.org/web/packages/oompaBase/index.html) + - palettetown [github](https://github.com/timcdlucas/palettetown) + [CRAN](https://cran.r-project.org/web/packages/palettetown/index.html) + - palr [github](https://github.com/AustralianAntarcticDivision/palr) + [CRAN](https://cran.r-project.org/web/packages/palr/index.html) + - pals [github](https://github.com/kwstat/pals) + [CRAN](https://cran.r-project.org/web/packages/pals/index.html) + - Polychrome + [CRAN](https://cran.r-project.org/web/packages/Polychrome/index.html) + - quickpalette [github](https://github.com/EmilHvitfeldt/quickpalette) + - rcartocolor [github](https://github.com/Nowosad/rcartocolor) + [CRAN](https://cran.r-project.org/web/packages/rcartocolor/index.html) + - RColorBrewer + [CRAN](https://cran.r-project.org/web/packages/RColorBrewer/index.html) + - Redmonder + [CRAN](https://cran.r-project.org/web/packages/Redmonder/index.html) + - RSkittleBrewer + [github](https://github.com/alyssafrazee/RSkittleBrewer) + - scico [github](https://github.com/thomasp85/scico) + [CRAN](https://cran.r-project.org/web/packages/scico/index.html) + - viridis [github](https://github.com/sjmgarnier/viridis) + [CRAN](https://cran.r-project.org/web/packages/viridis/index.html) + - visibly [github](https://github.com/m-clark/visibly) + [CRAN](https://cran.r-project.org/web/packages/visibly/index.html) + - wesanderson [github](https://github.com/karthik/wesanderson) + [CRAN](https://cran.r-project.org/web/packages/wesanderson/index.html) + - yarrr [github](https://github.com/ndphillips/yarrr) + [CRAN](https://cran.r-project.org/web/packages/yarrr/index.html)