alarm
is an internal ALARM Project package designed to organize and
standardize plots and slides for weekly meetings. It is not intended for
public use. For packages intended for public use, please see the ALARM
Project webiste. For our mapping
functions, see ggredist.
You can install the development version of alarm from GitHub with:
# install.packages("devtools")
devtools::install_github("christopherkenny/alarm")
We have two slide templates, light and dark. To create a new PowerPoint from the templates, use the following.
out_file <- tempfile(fileext = '.pptx')
library(alarm)
alarm_ppt_create(template = 'light') |>
print(target = out_file)
alarm_ppt_create()
returns an officer
object which can be edited
using regular officer
functions.
We have a theme, color scales, and other related image functions. An example with the dark theme looks like:
ggplot2::mpg |>
ggplot2::ggplot() +
ggplot2::geom_point(ggplot2::aes(displ, hwy, color = class)) +
scale_color_alarm() +
theme_alarm_dark()
With the light theme, it looks like:
ggplot2::mpg |>
ggplot2::ggplot() +
ggplot2::geom_point(ggplot2::aes(displ, hwy, color = class)) +
scale_color_alarm() +
theme_alarm_light()
Note: these are used for internal presentations to make the plots match with our slides. For colorblind, publication-ready colors, the ALARM Project primarily uses Cory McCartan’s wacolors package or our ggredist package.