Description Usage Arguments Value
View source: R/plot_lollipop.R
This function takes in data and produces a horizontal lollipop plot by ethnoracial, income, and gentrification category. The order of these categories can be adjusted by changing the factor levels of the facet variable. Input data needs columns for variable of interest (titled "var") and tract number (titled "tractid10"). Intended to be used after oakViz::aggregate_categories().
1 2 3 4 5 6 7 8 9 10 11 12 13 |
data |
Data with column for variable of interest. |
var |
Column name of variable of interest. |
limits |
Y-axis limits. |
panel |
If T, creates horizontal panel of 2 plots |
var2 |
Column name of second variable of interest, if panel = T |
panel_titles |
Vector of 2 strings containing titles for plots in panel |
x_title |
Title to display along x-axis |
scale_type |
Y-axis scale type: "numeric" or "percent" |
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 |
Lollipop plot of variable by ethnoracial, income, and gentrification category, with optional columns by SES.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.