以下作品:
acs::acs.fetch(dataset = "acs",
endyear = 2015,
span = 5,
geography = acs::geo.make(zip = "*"),
variable = "B01001_001")
这样做也是如此:
acs::acs.fetch(dataset = "sf1",
endyear = 2010,
span = 0,
geography = acs::geo.make(state = "*"),
variable = "PCT0120001")
请向我解释为什么以下不起作用,因为这不是因为人口普查 API 没有可用的邮政编码级别估计。我是否需要以不同的方式指定地理位置才能从 sf1 和从人口普查 API 中的 acs5 获得国家和 ZCTA 级别的估计值?
acs::acs.fetch(dataset = "sf1",
endyear = 2010,
span = 0,
geography = acs::geo.make(zip = "*"),
variable = "PCT0120001")
# Error in file(file, "rt") : cannot open the connection
# In addition: Warning message:
# No data found at:
# http://api.census.gov/data/2010/sf1?key=2dd03c4048ca2edb8463d8c0bbdc09c5eb3b4013&get=PCT0120001,NAME&for=zip+code+tabulation+area:*
acs::acs.fetch(dataset = "sf1",
endyear = 2010,
span = 0,
geography = acs::geo.make(us = "*"),
variable = "PCT0120001")
# Error in file(file, "rt") : cannot open the connection
# In addition: Warning message:
# No data found at:
# http://api.census.gov/data/2010/sf1?key=2dd03c4048ca2edb8463d8c0bbdc09c5eb3b4013&get=PCT0120001,NAME&for=us:*