hrecht / censusapi

R package to retrieve U.S. Census data and metadata via API
https://www.hrecht.com/censusapi/
169 stars 31 forks source link

Error: Invalid 'for' argument #6

Closed mattwilliamson13 closed 7 years ago

mattwilliamson13 commented 7 years ago

I am trying to download population data for OR based on block group geography using the following code:

data1990 <- getCensus(name="sf1", vintage=1990, key='baaaffb5ed3accd8dfa53c6f827659d43fcdfa21', vars="P0010001", region="block+group:*", regionin="state:41")

I get an "error: invalid 'for' argument" message. I'm assuming this has something to do with the fact that I am trying to 1990 Census data (which has given me problems in my other attempts to access), but am unsure. Are you able to access this data at block group level?

hrecht commented 7 years ago

Thanks for asking - I'm also seeing this error for tracts and blocks in 1990. For 2000 sf1, however, I'm not seeing this error.

This issue is coming directly from the API, but I don't see any changes to their documentation for the 1990 decennial. Working: http://api.census.gov/data/1990/sf1?get=P0010001&for=county: http://api.census.gov/data/1990/sf1?get=P0010001&for=county:&in=state:06 Not working: http://api.census.gov/data/1990/sf1?get=P0010001&for=tract:*&in=state:06 http://api.census.gov/data/1990/sf1?get=P0010001&for=block+group:*&in=state:06

I've gotten tons of tract level from the 1990 API before without issue, but something appears to have since changed. How long have you been having this issue? Since the issue is with the underlying API, I can't provide a fix. However, please report this issue to the Census dev team! If they respond, I'd be curious to hear what they say. This might be old but last contact I have is cnmp.developers.list@census.gov (or try calling and ask for the developer contact, they're pretty responsive on the phone.)

I've already tried to get them to add 1990 universe labels to the API documentation but they've responded that they're focused on newer data. So absolutely let them know you're using 1990 and having issues so they continue to support it.

mattwilliamson13 commented 7 years ago

Hi Hannah, Thank you for getting back to me. I can actually get the data down to the tract level (at least for OR), but things break at the block group. I just spent some time on the phone with folks at the “Data Ferrett” help desk and he said it’s a bug on their end. He’s reporting it and hopefully something will come of that. I’m also going to try to email the contact you have below. I’ll keep you posted (if you’re interested). Thanks M

Matt Williamson Ph.D. Candidate Graduate Group in Ecology University of California, Davis

On Jan 13, 2017, at 8:18 AM, Hannah Recht notifications@github.com wrote:

Thanks for asking - I'm also seeing this error for tracts and blocks in 1990. For 2000 sf1, however, I'm not seeing this error.

This issue is coming directly from the API, but I don't see any changes to their documentation for the 1990 decennial. Working: http://api.census.gov/data/1990/sf1?get=P0010001&for=county http://api.census.gov/data/1990/sf1?get=P0010001&for=county: Working: http://api.census.gov/data/1990/sf1?get=P0010001&for=county:&in=state:06 http://api.census.gov/data/1990/sf1?get=P0010001&for=county:*&in=state:06 Not working: http://api.census.gov/data/1990/sf1?get=P0010001&for=tract:*&in=state:06 http://api.census.gov/data/1990/sf1?get=P0010001&for=tract:*&in=state:06 I've gotten tons of tract level from the 1990 API before without issue, but something appears to have since changed. How long have you been having this issue? Since the issue is with the underlying API, I can't provide a fix. However, please report this issue to the Census dev team! If they respond, I'd be curious to hear what they say. This might be old but last contact I have is cnmp.developers.list@census.gov mailto:cnmp.developers.list@census.gov (or try calling and ask for the developer contact, they're pretty responsive on the phone.)

I've already tried to get them to add 1990 universe labels to the API documentation but they've responded that they're focused on newer data. So absolutely let them know you're using 1990 and having issues so they continue to support it.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/hrecht/censusapi/issues/6#issuecomment-272467436, or mute the thread https://github.com/notifications/unsubscribe-auth/AGLqUXMlWPKb01yEUrUJxVZ8vGzUetcoks5rR5WtgaJpZM4LiCN9.

hrecht commented 7 years ago

Definitely interested in updates, thanks for reporting back!