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.
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")
# Load required packages
library(ggplot2)
library(cccmthemes)
# 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()
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.
We extend our gratitude to the creators of the
{hrbrthemes}
,
{cowplot}
and
{unhcrthemes}
packages
that influenced the development of {cccmthemes}
.
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.
This package is distributed under the MIT License.