line_graph: Produce line graph of variable by periods

Description Usage Arguments Value

View source: R/line_graph.R

Description

This function takes in data and produces a line graph of variables by periods, grouped by neighborhood category or race.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
line_graph(
  dat,
  var,
  y_title = NULL,
  group = "race",
  facet_label = F,
  save = F,
  savename = "plot.png",
  caption = paste0(acs_caption,
    "\nUnemployment Estimates were sourced from Catalist's DEEP-MAPS Project.")
)

Arguments

dat

Data with a columns containing variable of interest, character periods variable ("periods"), and grouping variable ("cat").

var

Name of variable to plot.

y_title

Title to display along y-axis.

group

Category for color grouping: "race" (default), "ethnoracial", "income", "gent"

facet_label

T if user has facetting variable "facet_label"

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

Line graph of variable by periods, grouped by race, ethnoracial, income, or gentrification category.


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