Filter ACS data by table ID, variables, or other attributes using
dplyr::filter()
Source: R/filter_acs.R
filter_acs.Rd
filter_acs()
helps to filter a data frame of American Community Survey data
enriched with table and column metadata using the label_acs_metadata()
function using dplyr::filter()
.
Usage
filter_acs(
data,
...,
table = NULL,
column = NULL,
vars = NULL,
drop_vars = NULL,
geography = NULL,
variable_col = "variable"
)
Arguments
- data
A data frame with a "table_id", "variable", and "column_title" columns.
- ...
Parameters passed to
dplyr::filter()
- table, column
Table ID and column title values to return.
- vars, drop_vars
Variable IDs to keep or to drop. If table is supplied (or if data only contains data for a single table), numeric values are allowed for vars and drop_vars (e.g. if table is "B14001" and vars is 2 data is filtered to variable "B14001_002").
- geography
Geography values to filter by.
- variable_col
Variable column name. Defaults to "variable".