Description Usage Arguments Value
View source: R/plot_bar_race.R
This function takes in data and produces a bar chart grouped by race across two periods (2006-2010 and 2012-2016).
1 2 3 4 5 6 7 8 9 10 | plot_bar_race(
dat,
var,
limits,
y_title = NULL,
scale_type = "percent",
save = F,
savename = "plot.png",
caption = paste0(frb_caption, ses_caption, period_caption)
)
|
dat |
Data with a column containing "race", "periods", and variable of interest |
var |
Name of column containing variable to plot. |
limits |
Y-axis limits |
y_title |
Title to display along y-axis. |
scale_type |
Y-axis scale type: "numeric" or "percent" |
save |
T if user would like to return plot object and save file, F (default) to just return object. |
savename |
File name of map for saving. |
caption |
Caption for figure |
Grouped bar chart by race across 2 periods.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.