Skip to content

Descriptive variable / column names? #275

Description

@arilamstein

I'm using tidycensus for the first time in a year. I'm trying to get output from a table, and am surprised that the variable names are codes, and not English words. For example:

> get_acs("congressional district", table="B03002", output="wide", cache_table=TRUE)
>  A tibble: 440 x 44
   GEOID NAME  B03002_001E B03002_001M B03002_002E B03002_002M B03002_003E B03002_003M
   <chr> <chr>       <dbl>       <dbl>       <dbl>       <dbl>       <dbl>       <dbl>
 1 2701  Cong…      672649         322      629764         419      576824         542
 2 2702  Cong…      698522         399      656109         615      568269         966
 3 2703  Cong…      710378         517      678509        1781      551545        2888
 4 2704  Cong…      706259         337      658885         583      472459         985
 5 2705  Cong…      707352         449      641898        1748      444397        2775
 6 2706  Cong…      702583         541      683042        1071      626547        1323
 7 2707  Cong…      664941         540      633419         682      588501         706
 8 2708  Cong…      664674         326      652968         351      609529         431
 9 2801  Cong…      760715         674      735566         664      508360         623
10 2802  Cong…      711716        1621      695686        1676      216997        1066

I recall dealing with the issue when I last used Tidycensus. But I can't seem to remember how I solved it.

When I type the table name directly into Google I wind up here: https://censusreporter.org/tables/B03002/. My assumption is that what Tidycensus calls B03002_001E is the first row in that table ("total"). But is _002E "Not Hispanic or Latino:", or is that a placeholder with no data? In that case _002E is actually "White alone". Or maybe this website is from a different vintage of the survey, in which case the variable codes might map to totally different data.

I guess my question is this: does tidycensus have support for using English variable names instead of codes? If not, what is the best way to do this myself? I'd really like to avoid winging it with something this important.

Thanksl

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions