ses_period_map_panel: Produce 4x4 map panel of variable of interest in Oakland

Description Usage Arguments Value

View source: R/ses_period_map_panel.R

Description

This function takes in data and produces a 4x4 panel of data across SES and periods. Not intended to be used with aggregated CCP data. Assumes 5% sample of population, all counts are multiplied by 20.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
ses_period_map_panel(
  data,
  var,
  shp_tracts,
  palette = "sequential",
  jenksbreaks = T,
  neg_bins = 3,
  pos_bins = 3,
  breaks = scales::extended_breaks(n = 6),
  labels = scales::comma,
  limits = NULL,
  save = F,
  savename = "plot.png",
  caption = paste0(frb_caption, ses_caption, period_caption)
)

Arguments

data

Data with a column containing tractid10, year, ses, and variable of interest.

var

Name of column containing variable to plot (absolute count, not pct).

shp_tracts

"US_tract_2010.shp" loaded object

palette

Color palette: "sequential" (default) or "diverging"

jenksbreaks

Uses Jenks Breaks when T, otherwise uses continuous color scale

neg_bins

For Jenks breaks, number of negative color bins. Default is 3.

pos_bins

For Jenks breaks, number of positive color bins. Default is 3.

breaks

Gradient scale breaks, either numeric vector or scales::extended_breaks(n = 6)

labels

Gradient scale labels, either character vector or scales::percent or scales::comma

limits

Gradient scale limits, c(min, max)

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

Figure caption

Value

4x4 panel maps of variable of interest, by SES and period.


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