barplot of summary stats on special areas and features at the sites
Source:R/ejam2areafeatures_FLAGGED_FUNCTIONS.R
ejam2barplot_areafeatures.RdSummary of whether residents at the analyzed locations are more likely to have certain types of features (schools) or special areas (Tribal, nonattainment, etc.)
Usage
ejam2barplot_areafeatures(
ejamitout,
main = NULL,
ylab = NULL,
shortlabels = NULL,
vs = c("us", "state")
)Arguments
- ejamitout
output from ejamit()
- main
optional title for plot. If NULL (default), a title is chosen based on the
vsparameter.- ylab
optional y axis label. If NULL (default), a label is chosen based on the
vsparameter.- shortlabels
optional alternative labels for the bars
- vs
"us" (default) to plot ratios to the US average, or "state" to plot ratios to the average in the State(s) analyzed (population-weighted across the states of the residents analyzed). "state" requires ejamitout to have the ratio_to_state_avg column in results_summarized$flagged_areas (from a current version of ejamit()).
Details
See
varinfo(c(names_featuresinarea, names_flag, names_criticalservice))[,c("longname", "varlist")]
These are the indicator summary stats shown:
"Number of Schools"
"Number of Hospitals"
"Number of Worship Places"
"Flag for Overlapping with Tribes"
"Flag for Overlapping with Non-Attainment Areas"
"Flag for Overlapping with Impaired Waters"
"Flag for Overlapping with CEJST Disadvantaged Communities"
"Flag for Overlapping with EPA IRA Disadvantaged Communities"
"Flag for Overlapping with Housing Burden Communities"
"Flag for Overlapping with Transportation Disadvantaged Communities"
"Flag for Overlapping with Food Desert Areas"
"% Households without Broadband Internet"
"% Households without Health Insurance"
Examples
out <- testoutput_ejamit_1000pts_1miles
ejam2barplot_areafeatures(out)
shortlabels = EJAM:::flagged_areas_shortlabels_from_ejam(out)
ejam2barplot_areafeatures(out, shortlabels = shortlabels)
# ratios to State averages instead of US averages:
if ("ratio_to_state_avg" %in% names(ejam2areafeatures(out))) {
ejam2barplot_areafeatures(out, vs = "state")
}