Description Usage Arguments Value Examples
Make a barchart of weighted counts within categories from the ACS PUMS data. Optionally, this can be a stacked barchart, partitioned over two variables.
1 2 |
data |
ACS PUMS data for housing or population |
x |
(string) name of categorical variable in data to put on x-axis |
stack |
optional (string) name of categorical value for stacked bar chart |
title |
optional plot title |
xlab |
optional x label |
ylab |
optional y label |
ggplot of weighted count data
1 2 3 4 5 6 7 8 9 10 | wa.house16$Tenure <- own.rent(wa.house16)
acs.barchart(wa.house16, 'Tenure',
title='Housing Unit Count by Tenure', xlab='Tenure')
wa.pop16$sex <- acs.recode(wa.pop16, 'SEX', data.dict16)
wa.pop16$emp.stat <- acs.translate(wa.pop16, 'ESR', c(NA, 1:6),
c('NILF', 'Employed', 'Employed', 'Unemployed', 'Employed', 'Employed', 'NILF'))
acs.barchart(wa.pop16, 'emp.stat', stack='sex',
title='Employment Status by Gender',
xlab='Employment Status')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.