Label ggplot2 plots with the appropriate credit caption for NHGIS data
Source:R/labs_nhgis.R
labs_nhgis.Rd
labs_nhgis()
adds a standard credit caption for NHGIS data to make consistent attribution easier.
Usage
labs_nhgis(
...,
caption = NULL,
credit = "IPUMS NHGIS, University of Minnesota, www.nhgis.org.",
prefix = "Source: ",
collapse = " ",
width = 80
)
Arguments
- ...
Arguments passed on to
ggplot2::labs
title
The text for the title.
subtitle
The text for the subtitle for the plot which will be displayed below the title.
tag
The text for the tag label which will be displayed at the top-left of the plot by default.
alt,alt_insight
Text used for the generation of alt-text for the plot. See get_alt_text for examples.
- caption
Optional text appearing before IPUMS credit text.
- credit
Credit line for IPUMS.
- prefix
Prefix text appearing before
credit
text.- collapse
String to collapse
caption
andcredit
. Defaults to" "
. Set to"\n"
to place the credit line on a separate line following the caption. Ignored if caption isNULL
.- width
Maximum width of caption line passed to
stringr::str_wrap()
.