-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME.Rmd
80 lines (59 loc) · 2.97 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
75
76
77
78
79
80
---
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-",
fig.retina = 2,
dpi = 300,
dev = "ragg_png"
)
```
# cccmthemes
<!-- badges: start -->
[![Project Status: WIP – Initial development is in progress, but there has not yet been a stable, usable release suitable for the public.](https://www.repostatus.org/badges/latest/wip.svg)](https://www.repostatus.org/#wip)
[![R-CMD-check](https://github.com/unhcr-dataviz/cccmthemes/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/unhcr-dataviz/cccmthemes/actions/workflows/R-CMD-check.yaml)
[![CRAN status](https://www.r-pkg.org/badges/version/cccmthemes)](https://CRAN.R-project.org/package=cccmthemes)
<!-- badges: end -->
Simplify the creation of your data visualizations with the `{cccmthemes}` R package. It is designed to align your plots with [CCCM's Design Guide](https://www.cccmcluster.org/branding-collection) recommendations. This package offers a comprehensive `{ggplot2}` theme, including built-in customizations and thoughtfully crafted color palettes.
## Installation
Get started by installing the `{cccmthemes}` package from GitHub using the `{pak}` library:
```{r install, eval=FALSE}
# If pak is not yet installed, uncomment the following line:
# install.packages("pak")
pak::pkg_install("unhcr-dataviz/cccmthemes")
```
## Usage
```{r load, message = FALSE, warning = FALSE}
# Load required packages
library(ggplot2)
library(cccmthemes)
```
### Base `{ggplot2}` theme
```{r base-plot, message = FALSE, warning = FALSE, out.width="90%", fig.align="center"}
# Apply the theme_unhcr() to your plot
ggplot(
mtcars,
aes(x = hp, y = mpg)
) +
geom_point() +
labs(
title = "Simple scatterplot with ggplot",
subtitle = "This plot shows the default style of theme_cccm()",
x = "Horsepower (hp)",
y = "Fuel efficiency (mpg)",
caption = "Source: mtcars"
) +
theme_cccm()
```
### Font
The officially recommended font is [`Inter`](https://github.com/rsms/inter). To ensure optimal functionality of the `{cccmthemes}` package, please make sure that the `Inter` font is installed on your device prior to usage.
## Acknowledgements
We extend our gratitude to the creators of the [`{hrbrthemes}`](https://github.com/hrbrmstr/hrbrthemes), [`{cowplot}`](https://github.com/wilkelab/cowplot/) and [`{unhcrthemes}`](https://github.com/unhcr-dataviz/unhcrthemes) packages that influenced the development of `{cccmthemes}`.
## Contribution
Contributions to `{cccmthemes}` are highly valued. If you have suggestions, uncover bugs, or envision new features, kindly submit an [issue on GitHub](https://github.com/unhcr-dataviz/cccmthemes/issues). To contribute code, don't hesitate to fork the repository and create a pull request.
## License
This package is distributed under the [MIT License](https://github.com/unhcr-dataviz/cccmthemes/blob/master/LICENSE.md).