Overview

Make ggplot2 graphics that align closely with the Urban Institute style guide.

Examples

library(ggplot2)
library(urbnthemes)

ggplot(mpg, aes(hwy, cty, color = as.factor(cyl))) +
  geom_point() +
  labs(title = "Title", 
       subtitle = "Subtitle", 
       caption = "Caption",
       x = "X Variable", 
       y = "Y Variable") +
  theme_urbn_web()

Quick palettes

urbnthemes contains many quick-access color palettes from the Urban Institute Data Visualization Style Guide. These palettes can be used to quickly overwrite default color palettes from urbnthemes.

There are seven palettes that are continuous palettes of the seven unique colors in the discrete Urban Institute color palette:

All color palettes are listed in the documentation for any color palette. Simply submit ?<palette name> to see a list of all palettes. Furthermore, all palettes begin with palette_urbn_* so autocomplete can be used to quickly explore the entire list of palettes.

The vectors can be subset using base R syntax.

palette_urbn_main[1:4]
palette_urbn_spacegray[1:5]


UI-Research/urbnthemes documentation built on Aug. 26, 2018, 9:09 a.m.