Description Usage Arguments Value
View source: R/ses_period_map_panel.R
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.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
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 |
4x4 panel maps of variable of interest, by SES and period.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.