Error when fetching acs data

902 Views Asked by At

Can anyone help with this error? I am trying to download population data. I am not sure what this error is about. Here is my code.

state.IN=geo.make(state="IN")
indiana.total.pop=acs.fetch(geography=state.IN,table.number="B01003")

Error in seq.default(1, (length(in.data) - geo.length), 2) : wrong sign in 'by' argument

2

There are 2 best solutions below

0
On

Make sure you run acs::api.key.install("YOUR CENSUS KEY") before working with any of the acs functions. I was getting the same error, and once I fixed my api key install, it resolved the issue

0
On

i changed the endyear from 2011 to 2014 and it fixed it for me