esp_traffic.Rd
This function plots ESP indicator traffic light figures
esp_traffic(
data,
name,
out = "ggplot",
paginate = FALSE,
label = TRUE,
status = TRUE,
caption = "",
ncolumn = 1,
silent = FALSE,
min_year = NULL,
chunk_label = "traffic",
f_units = FALSE,
y_units = TRUE,
...
)
The ESP indicator data. Should have a column for Year and a column for each indicator.
The file name for the image. Will be saved relative to the working directory.
Whether the function should save the plot, print a ggplot object in markdown, or return a ggplot object to the working environment (for use with one_pager()
). One of c("ggplot", "save", "one_pager")
Whether to paginate the plots with ggforce::facet_wrap_paginate
Whether to label the facets with a, b, c, etc.
Whether to label the facets with the indicator status
A caption for the figure
How many columns the figure should have (1 by default)
Whether to print the caption
The minimum year to show on the plots. If left NULL (the default), the minimum year will be the first year of the dataset.
The label name to look for to create the figure number. This is a work-around to deal with figure pagination.
Whether to add units in the facet header
Whether to add units to the y-axis
Passed to ggplot2::ggsave
An image file