stacked_bar: Produce panel of stacked bar charts

Description Usage Arguments Value

View source: R/stacked_bar.R

Description

This function takes in data and produces a panel of stacked bar charts, based on different groupings. Intended to be used with oakViz::aggregate_categories()

Usage

1
2
3
4
5
6
7
8
9
stacked_bar(
  dat,
  fill = "ses",
  group = "period",
  y_title = NULL,
  save = F,
  savename = "plot.png",
  caption = paste0(frb_acs_caption, ses_caption, period_caption)
)

Arguments

dat

Data with a column containing variables of interest and grouping variables.

fill

Name of column containing fill variable: "ses" (default), "move", "dest".

group

Category for x-axis grouping: "period" (default), "ses"

y_title

Title to display along y-axis.

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.