calc_acs_table: Calculate ACS table

Description Usage Arguments Value Examples

Description

Calculates aggregated sums and percentages for groups of ACS variables

Usage

1
calc_acs_table(groups, denom, table)

Arguments

groups

A named list. Each item should be a numeric vector of column positions. Names will be used as aggregation terms

denom

A single-column ACS object, or one column of a larger ACS object, to be used as the denominator

table

An ACS object where groups columns are located

Value

Returns an acs-class object, as is standard from the acs package.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
# Calculate the share of CT population below poverty and below 2x poverty
# (numerators), out of all residents for whom poverty status is determined
# (denominator)
poverty_table <- acs.fetch(geography = geo.make(state = 9),
  endyear = 2015, table.number = "C17002", col.names = "pretty")
pov_status_determined <- poverty[, 1]
pov_groups <- list(
  below_poverty = 2:3,
  low_income = 2:7
)
share_in_poverty <- calc_acs_table(pov_groups,
  pov_status_determined, poverty_table)

CT-Data-Haven/acsprofiles documentation built on June 13, 2019, 8:20 a.m.