[acs-r] Difficulty with worked example on blog
Ezra Haber Glenn
eglenn at MIT.EDU
Wed Jul 3 13:49:41 EDT 2013
Peter:
Sorry for the delay in replying -- this is a new list and I think the
moderation settings were messed up.
As far as I can tell, this seems to be a problem with your API key.
Can you check your key again, run a fresh:
> api.key.install(key="YOURKEYHERE")
and let me know if it works?
When I try it, I get the following:
=================
> my.tract=geo.make(state="MA", county="Middlesex", tract=387201, block.group="*", check=T)
Testing geography item 1: Tract 387201, Blockgroup *, Middlesex County, Massachusetts .... OK.
> total.pop=acs.fetch(geo=my.tract, table.number="B01003")
total.pop=acs.fetch(geo=my.tract, table.number="B01003")
> total.pop
ACS DATA:
2007 -- 2011 ;
Estimates w/90% confidence intervals;
for different intervals, see confint()
B01003_001
Block Group 1, Census Tract 3872.01, Middlesex County, Massachusetts 2681 +/- 319
Block Group 2, Census Tract 3872.01, Middlesex County, Massachusetts 952 +/- 213
Block Group 3, Census Tract 3872.01, Middlesex County, Massachusetts 1010 +/- 156
Block Group 4, Census Tract 3872.01, Middlesex County, Massachusetts 938 +/- 214
>
==================
On Sat Jun 1 13:45:21 EDT 2013 Peter Cowan cowan.pd at gmail.com wrote:
> I'm trying to work the example at:
>
> http://eglenn.scripts.mit.edu/citystate/2013/03/acs-r-a-worked-example-using-blockgroup-level-data/
>
> There appears to be a problem with the acs.fetch function for me. I have
> previously saved an API key file.
>
> > my.tract=geo.make(state="MA", county="Middlesex",
> + tract=387201, block.group="*", check=T)
> Testing geography item 1: Tract 387201, Blockgroup *, Middlesex County,
> Massachusetts .... Error in seq.default(1, (length(in.data) - geo.length),
> 2) :
> wrong sign in 'by' argument
> > my.tract=geo.make(state="MA", county="Middlesex",
> + tract=387201, block.group="*")
> > total.pop=acs.fetch(geo=my.tract, table.number="B01003")
> Error in seq.default(1, (length(in.data) - geo.length), 2) :
> wrong sign in 'by' argument
>
> Thanks
>
> Peter
--
Ezra Haber Glenn, AICP
Department of Urban Studies and Planning
Massachusetts Institute of Technology
77 Massachusetts Ave., Room 7-337
Cambridge, MA 02139
eglenn at mit.edu
http://dusp.mit.edu/faculty/ezra-glenn | http://eglenn.scripts.mit.edu/citystate/
617.253.2024 (w)
617.721.7131 (c)
More information about the acs-r
mailing list