以下工作:爲什麼我無法使用R package acs從SF1獲得國家和ZCTA級別的估計?
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獲取國家和ZCTA級別的估算值,而不是從人口普查API中的acs5中獲取?
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:*