简体   繁体   English

R Tidy Census - 18 岁以上选民的变量

[英]R Tidy Census - Variable for Voters 18+

I have been trying to find a variable on the Tidy Census' latest American Community Survey (ACS) variable list.我一直试图在 Tidy Census 的最新美国社区调查 (ACS) 变量列表中找到一个变量。

The one I'm looking for would be for all voters aged 18 and up.我正在寻找的对象是所有 18 岁及以上的选民。 I have yet to find it in the list.我还没有在列表中找到它。 Even if I have to combine a couple variables to make it work, that's fine too.即使我必须组合几个变量才能使其工作,那也没关系。

I search for relevant keywords related to age, but have yet to find anything.我搜索与年龄相关的相关关键字,但还没有找到任何东西。 Variables that appear with “18 years and over” have a greater specificity than what I am looking for.以“18 岁及以上”出现的变量比我正在寻找的变量具有更大的特异性。 I may be missing something though;不过,我可能会遗漏一些东西; I'm new to Tidy Census.我是 Tidy Census 的新手。

Help would be greatly appreciated!帮助将不胜感激!

Finding Census variables is difficult.查找人口普查变量很困难。 Start here: https://data.census.gov/table?q=ACS从这里开始: https ://data.census.gov/table?q=ACS

In table S0101 under labels there is a selected age categories variable named 18 years and over .在标签下的表S0101中,有一个名为18 years and overselected age categories变量。

Searched those those keywords and found this long list.搜索那些关键字并找到这个长列表。https://api.census.gov/data/2019/acs/acs1/subject/variables/https://api.census.gov/data/2019/acs/acs1/subject/variables/

Where we find variable "S0101_C01_026".我们在哪里找到variable “S0101_C01_026”。

["S0101_C01_026E","Estimate,,Total!!Total population!!SELECTED AGE CATEGORIES!!18 years and over","AGE AND SEX"], ["S0101_C01_026E","估计,,总计!!总人口!!选择的年龄类别!!18 岁及以上","年龄和性别"],

Then we can get that variable:然后我们可以获得该变量:

county_data<-get_acs(geography = "county", 
                variables = "S0101_C01_026",
                cache_table=TRUE,
                year=2021)

county_data县数据

# A tibble: 3,221 × 5 GEOID NAME variable estimate moe <chr> <chr> <chr> <dbl> <dbl> 1 01001 Autauga County, Alabama S0101_C01_026 44438 122 2 01003 Baldwin County, Alabama S0101_C01_026 178105 NA 3 01005 Barbour County, Alabama S0101_C01_026 19995 28 4 01007 Bibb County, Alabama S0101_C01_026 17800 44 5 01009 Blount County, Alabama S0101_C01_026 45201 75

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM