est_moe_derive: Group ACS data and calculate derived-MOEs

View source: R/est_moe_derive.R

est_moe_deriveR Documentation

Group ACS data and calculate derived-MOEs

Description

Groups tidy-census ACS dataframe by set of group columns, calculates aggregated estimates, and derives margin of error for aggregated estimates, per ACS instructions.

Usage

est_moe_derive(
  df,
  group_cols,
  est_col = "estimate",
  moe_col = "moe",
  name_col = paste(group_cols, collapse = "_")
)

Arguments

df

A tidy-census ACS dataframe.

group_cols

Names of columns to group the dataframe by, formatted as a character vector.

est_col

Name of estimate column, typically "estimate", formatted as a character string.

moe_col

Name of margin of error column, typically "moe", formatted as a character string.

name_col

Name of new, aggregated moe column, formatted as character string.

Value

A dataframe with estimates aggregated across group columns and a derived margin of error.


dpowerstp/acsprocess documentation built on Sept. 4, 2022, 10:18 a.m.