-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME.Rmd
74 lines (52 loc) · 2.22 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# poispalette
<!-- badges: start -->
[![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental)
[![R-CMD-check](https://github.com/poissonconsulting/poispalette/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/poissonconsulting/poispalette/actions/workflows/R-CMD-check.yaml)
[![Codecov test coverage](https://codecov.io/gh/poissonconsulting/poispalette/branch/master/graph/badge.svg)](https://codecov.io/gh/poissonconsulting/poispalette?branch=master)
[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT)
<!-- badges: end -->
## Introduction
`poispalette` is an R package that facilitates the use of Poisson Consulting colour palettes in data plots and maps.
## Installation
To install the latest development version from [GitHub](https://github.com/poissonconsulting/poispalette)
```r
# install.packages("remotes")
remotes::install_github("poissonconsulting/poispalette")
```
## Demonstration
Retrieve Poisson colours and palettes
```{r}
library(poispalette)
pois_pal("discrete")
pois_cols(c("red", "yellow"))
```
Plot discrete scales
```{r}
library(ggplot2)
ggplot2::ggplot(poispalette::points, aes(x = RandomX, y = RandomY)) +
geom_point(aes(colour = ID), size = 2) +
scale_colour_disc_poisson()
```
Plot gradient scales
```{r}
ggplot2::ggplot(poispalette::points, aes(x = X, y = Y)) +
geom_point(aes(colour = RandomX), size = 2) +
scale_colour_grad_poisson(palette = "cool")
```
## Contribution
Please report any [issues](https://github.com/poissonconsulting/poispalette/issues).
[Pull requests](https://github.com/poissonconsulting/poispalette/pulls) are always welcome.
## Code of Conduct
Please note that the poispalette project is released with a [Contributor Code of Conduct](https://contributor-covenant.org/version/2/0/CODE_OF_CONDUCT.html). By contributing to this project, you agree to abide by its terms.