acs.boxplot: Make boxplot from ACS PUMS data

Description Usage Arguments Value Examples

View source: R/acs.boxplot.R

Description

Make a weighted boxplot of the distribution of a numeric field in the ACS PUMS data, partitioned by a categorical field.

Usage

1
acs.boxplot(data, x, y, title = NULL, xlab = NULL, ylab = NULL)

Arguments

data

ACS PUMS data for housing or population

x

(string) name of categorical variable in data to put on x-axis

y

(string) name of numeric variable in data for y-axis

title

optional plot title

xlab

optional x label

ylab

optional y label

Value

ggplot of the weighted distribution of y, partitioned by x

Examples

1
2
3
4
wa.house16$Beds <- clip.column(wa.house16, 'BDSP', 5)
acs.boxplot(wa.house16[!is.na(wa.house16$GRNTP),], 'Beds', 'GRNTP',
            title='Rent vs. Bedrooms', xlab='Beds (max. 5)',
            ylab='Gross Rent($)')

davidthaler/PUMSutils documentation built on July 13, 2019, 9:58 a.m.