Overview

urbnthemes is a set of tools for creating Urban Institute-themed plots and maps in R. The package extends ggplot2 with print and map themes as well as tools that make plotting easier at the Urban Institute.

A comprehensive set of examples is available at the Urban Institute R Users Group website.

Stay up-to-date

Sign up here to stay up-to-date with R package releases and R resources from the Urban Institute. We will not share your information and we will not email more than once per month.

Installation

install.packages("remotes")
remotes::install_github("UrbanInstitute/urbnthemes", build_vignettes = TRUE)

Fonts

The Urban Institute uses Lato font for publications. After installing urbnthemes, submit urbnthemes::lato_test() to see if Lato is imported and registered.

If Lato isn’t imported and registered, install Lato and then submit urbnthemes::lato_install(). If you are on a Windows, you may need to install ghostscript and then submit Sys.setenv(R_GSCMD = "link to the ghostscript .exe") before running urbnthemes::lato_install().

Waffle charts with glyphs require fontawesome. fontawesome_test() and fontawesome_install() are the fontawesome versions of the above functions. Be sure to install fontawesome from here.

Usage

Always load library(urbnthemes) after library(ggplot2) or library(tidyverse).

library(tidyverse)
library(urbnthemes)

set_urbn_defaults(style = "print")

Getting help

Contact Aaron Williams or Kyle Ueyama with feedback or questions.

Code of conduct

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.