View source: R/est_moe_derive.R
est_moe_derive | R Documentation |
Groups tidy-census ACS dataframe by set of group columns, calculates aggregated estimates, and derives margin of error for aggregated estimates, per ACS instructions.
est_moe_derive( df, group_cols, est_col = "estimate", moe_col = "moe", name_col = paste(group_cols, collapse = "_") )
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. |
A dataframe with estimates aggregated across group columns and a derived margin of error.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.