race_stacked_bar: Produce stacked bar charts filled by race category

Description Usage Arguments Value

View source: R/race_stacked_bar.R

Description

This function takes in data and produces a stacked bar chart, filled by race category. The facet and x-axis labels can be customized.

Usage

1
2
3
4
5
6
7
8
race_stacked_bar(
  dat,
  x_group,
  title = NULL,
  save = F,
  savename = "plot.png",
  caption = paste0(frb_acs_caption, ses_caption)
)

Arguments

dat

Data with a "variable" column containing races, a "value" column, a "cat" column for faceting labels, and x-axis grouping variable

x_group

Category for x-axis grouping

title

Plot title

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

Value

Panel of stacked bar charts of different groupings


Changing-Cities-Research-Lab/oakViz documentation built on May 13, 2021, 7:19 p.m.