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
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).
the ACS code for the variable (2016)
the ACS table the variable is in (2016)
A labelled variable for gender. 1 is Male, 2 is Female. Use
the labelled
or haven
package to see labels.
A numeric, binary version of gender
A labelled variable specifying which 5-way age bin the variable specifies
A labelled variable specifying which 10-way age bin the variable specifies
A labelled variable specifying which education (four-way) bin the variable specifies
A labelled variable specifying which education (three-way) bin the variable specifies
A labelled variable specifying which education bin the variable specifies
Modifications around tidycensus::load_variables
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".
head(acscodes_df)
#> # A tibble: 6 × 9
#> variable table gender female age_5 age_10 educ educ_3 race
#> <chr> <chr> <int+lbl> <int> <int+lbl> <int+lbl> <dbl+lbl> <dbl+> <int>
#> 1 B00001_001 B00001 NA NA NA NA NA NA NA
#> 2 B00002_001 B00002 NA NA NA NA NA NA NA
#> 3 B01001A_001 B01001 NA NA NA NA NA NA NA
#> 4 B01001A_002 B01001 1 [Male] 0 NA NA NA NA NA
#> 5 B01001A_003 B01001 1 [Male] 0 NA NA NA NA NA
#> 6 B01001A_004 B01001 1 [Male] 0 NA NA NA NA NA