Skip to content

Latest commit

 

History

History
90 lines (68 loc) · 2.73 KB

README.md

File metadata and controls

90 lines (68 loc) · 2.73 KB

cccmthemes

Project Status: WIP – Initial development is in progress, but there has not yet been a stable, usable release suitable for the public. R-CMD-check CRAN status

Simplify the creation of your data visualizations with the {cccmthemes} R package. It is designed to align your plots with CCCM’s Design Guide 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:

# If pak is not yet installed, uncomment the following line:
# install.packages("pak")

pak::pkg_install("unhcr-dataviz/cccmthemes")

Usage

# Load required packages
library(ggplot2)
library(cccmthemes)

Base {ggplot2} theme

# 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. 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}, {cowplot} and {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. To contribute code, don’t hesitate to fork the repository and create a pull request.

License

This package is distributed under the MIT License.