[acs-r] Error in downloading 2016 census data?
Ezra Haber Glenn
eglenn at mit.edu
Wed Mar 7 16:30:56 EST 2018
All that said, if you *were* using span = 5 and endyear = 2016 and
still ran into problems with tract-level fetching, it could be this:
1) updating the package to 2.1.3 (cures lookup problems)
2) when running geo.make with tracts, do it like this:
> mygeo <- geo.make(state=26,county=081,tract=c("001500","001600","001900","002600"))
The quotation marks keep the leading zeroes from being dropped for
tract numbers; this didn't matter in the past, but the API seems to be
enforcing the six-digit rule for tracts starting in 2016.
Let me know if that helps.
--Ezra
On Thu, 01 Mar 2018 12:05:31 -0500, Ezra Haber Glenn wrote:
>
>
> PS: Is it also possible that the tract-level 2016/1year ACS data is
> not available via the API (yet)? See
> <https://api.census.gov/data/2016/acs/acs1/geography.html>.
>
> I am able to get state and county data for 2016/1yr, but not tract.
>
> --Ezra
>
> On Thu, 01 Mar 2018 10:23:51 -0500, Ezra Haber Glenn wrote:
> >
> >
> > Ugh. Here's the deal, I think:
> >
> > It seems that the census folks have *once again* changed the format of
> > the ACS variable lookup code XML files, which is messing up the
> > package -- sorry about that. (Each year has a different set of
> > variable code tables, so this problem only affects the latest one,
> > 2016.)
> >
> > Basically, at this point, the package needs to make all sorts of
> > little corrections for each different endyear/span combination. I'll
> > try to troubleshoot and get it to work.
> >
> > In the meanwhile, here's a clever trick you can use to trick the
> > package to use the variable numbers from a previous year (which is
> > safe, unless the variable numbers change, which is pretty rare):
> >
> > # save a lookup from a year that works
> > a=acs.lookup(table.number = "B02001", endyear=2015, span=5)
> >
> > # use this in your new fetch:
> > acs.fetch(geography = all_counties, variable=a, endyear=2016, span=5)
> >
> >
> > Ta-da!
> >
> > Let me know if that sort of thing works, or if you have more questions.
> >
> >
> > --Ezra
> >
> >
> >
> > On Thu, 01 Mar 2018 09:01:35 -0500, Jacob Coblentz wrote:
> > >
> > > [1 <multipart/signed (7bit)>]
> > > [1.1 <multipart/alternative (7bit)>]
> > > [1.1.1 <text/plain; utf-8 (quoted-printable)>]
> > > [1.1.2 <text/html; utf-8 (quoted-printable)>]
> > > require(acs)
> > > api.key.install(key=my_key)
> > > all_counties<-geo.make(state="*",county="*")
> > > race_table<-acs.fetch(endyear = 2016, span=1, geography = all_counties, table.number = "B02001", col.names = "pretty")
> > >
> > > Error in data.frame(variable.code = names, table.number = table.numbers, :
> > > arguments imply differing number of rows: 3, 5
> > >
> > > What’s up with this error?
> > >
> > >
> > > [1.2 smime.p7s <application/pkcs7-signature (base64)>]
> > > Bad signature from BFFC03C590AF469434E317E8CFA9EE5397231274 /CN=Jacob Coblentz/OU=Client CA v1/O=Massachusetts Institute of Technology/ST=Massachusetts/C=US/EMail=coblentz at MIT.EDU
> > > [2 <text/plain; us-ascii (7bit)>]
> > > _______________________________________________
> > > acs-r mailing list
> > > acs-r at mit.edu
> > > http://mailman.mit.edu/mailman/listinfo/acs-r
> >
> > --
> > Ezra Haber Glenn, AICP
> > Department of Urban Studies and Planning
> > Massachusetts Institute of Technology
> > 77 Massachusetts Ave., Room 7-346
> > Cambridge, MA 02139
> > eglenn at mit.edu
> > http://dusp.mit.edu/faculty/ezra-glenn
> > 617.253.2024 (w)
> > 617.721.7131 (c)
> >
> > _______________________________________________
> > acs-r mailing list
> > acs-r at mit.edu
> > http://mailman.mit.edu/mailman/listinfo/acs-r
>
> --
> Ezra Haber Glenn, AICP
> Department of Urban Studies and Planning
> Massachusetts Institute of Technology
> 77 Massachusetts Ave., Room 7-346
> Cambridge, MA 02139
> eglenn at mit.edu
> http://dusp.mit.edu/faculty/ezra-glenn
> 617.253.2024 (w)
> 617.721.7131 (c)
>
> _______________________________________________
> acs-r mailing list
> acs-r at mit.edu
> http://mailman.mit.edu/mailman/listinfo/acs-r
--
Ezra Haber Glenn, AICP
Department of Urban Studies and Planning
Massachusetts Institute of Technology
77 Massachusetts Ave., Room 7-346
Cambridge, MA 02139
eglenn at mit.edu
http://dusp.mit.edu/faculty/ezra-glenn
617.253.2024 (w)
617.721.7131 (c)
More information about the acs-r
mailing list