A tidy dataframe where each row is a ACS code. This is useful internal data to give meaning to variable codes e.g. acscodes_age_sex_educ

acscodes_df

Format

A data frame with 22,134 rows where each row represents a variable in the ACS for which there is a count (e.g. 18-24 year olds who identify as Hispanic).

variable

the ACS code (2016)

gender

A labelled variable for gender. 1 is Male, 2 is Female. Use the labelled or haven package to see labels.

female

A numeric, binary version of gender

age_5

A labelled variable specifying which 5-way age bin the variable specifies

age_10

A labelled variable specifying which 10-way age bin the variable specifies

educ

A labelled variable specifying which race bin the variable specifies

race

A labelled variable specifying which education bin the variable specifies

Source

Modifications around tidycensus::load_variables

Details

The 5-yr ACS at 2018 is used, although codes should be fairly consistent across time. IF a demographic variable is NA, that means the variable collapses over the levels of that variable. In other words, NA here can be thought of as meaning "all".

Examples

head(acscodes_df)
#> # A tibble: 6 × 7 #> variable gender female age_5 age_10 educ race #> <chr> <int+lbl> <int> <int+lbl> <int+lbl> <dbl+lbl> <int+lbl> #> 1 B00001_001 NA NA NA NA NA NA #> 2 B00002_001 NA NA NA NA NA NA #> 3 B01001_001 NA NA NA NA NA NA #> 4 B01001_002 1 [Male] 0 NA NA NA NA #> 5 B01001_003 1 [Male] 0 NA NA NA NA #> 6 B01001_004 1 [Male] 0 NA NA NA NA