eglenn / acs

acs package in R / download, manage, analyze, and present data from the U.S. Census in R
3 stars 0 forks source link

acs.fetch generating incorrect url #6

Open sbalo opened 5 years ago

sbalo commented 5 years ago

Hi,

I'm using HH_data_2000 <- acs.fetch(table.name="H4", dataset = "sf3", geography = my.geos, endyear=2000, col.names="pretty")

to fetch home heating data. I'm getting the error:

trying URL 'http://web.mit.edu/eglenn/www/acs/acs-variables/sf3_2000.xml.gz' Content type 'application/xml' length 226788 bytes (221 KB) downloaded 221 KB

Error in file(file, "rt") : cannot open the connection In addition: Warning messages: 1: In (function (endyear, span = 5, dataset = "acs", keyword, table.name, : temporarily downloading and using archived XML variable lookup files; since this is much slower, recommend running acs.tables.install() 2: No data found at: https://api.census.gov/data/2000/acs/sf3?key=[redacted]&get=H040001,H040002,H040003,H040004,H040005,H040006,H040007,H040008,H040009,H040010,NAME&for=county:*&in=state:*

When I go to a browser and enter [note: removed "acs/" before sf3]: https://api.census.gov/data/2000/sf3?key=[redacted]&get=H040001,H040002,H040003,H040004,H040005,H040006,H040007,H040008,H040009,H040010,NAME&for=county:*&in=state:*

That works and it returns the data I'm looking for. I couldn't find anyway to remove the "acs/" through changing the acs.fetch command. Thanks in advance for your help!