[acs-r] Different data via API vs FactFinder?

Harald Kliems harald at madisonbikes.org
Tue Apr 17 08:39:09 EDT 2018


Ezra, thanks a lot for your quick response -- duh, I suspected it was
something as simple as that, but couldn't figure it out myself!

I really appreciate your work on this package!

Best,
 Harald.

On Tue, Apr 17, 2018 at 6:56 AM Ezra Haber Glenn <eglenn at mit.edu> wrote:

>
> Thanks for your email, and for using the package.  The issue you've
> run into here is that even though you set the "span=1" when you saved
> the variables, you didn't set it for acs.fetch, which means that
> acs.fetch used span=5 as a default.
>
> If you use this instead, I think you'll see the same numbers as
> FactFinder:
>
> ###########
> ## set geography to city of Madison, Wisconsin
> Madison <- geo.make(state="WI", place = 48000)
>
> ## select only the total, car/truck/van, public transport, bicycle,
> walk variables from table B08006
> TransitVars <- acs.lookup(2016, span = 1, table.number = "B08006",
> dataset = "acs")[c(1,2,8,14,15)]
>
> #fetch data for 2016 year and return them into acs object
>
> ###### ADD "span = 5" for acs.fetch()
>
> ACSData2016 <- acs.fetch(2016, span = 5, geography = Madison,
>                      variable = TransitVars,
>                      col.names = c("Total", "Motor Vehicle", "Public
> transit", "Bicycle", "Walked"))
> ##########
>
> Best,
> Ezra
>
> On Sun, 15 Apr 2018 15:19:18 -0400, Harald Kliems wrote:
> >
> > For our bike advocacy organization, I have been looking into commuting
> > data from the ACS. Until recently, I used the FactFinder to download
> > tables and then manipulate and analyze the data in LibreOffice Calc.
> > I've now tried using the very useful ACS.r package to improve my work
> > flow, but looking at the retrieved data, there seem to be differences
> > between what I get through the ACS.r/API and what I download through
> > the web interface from FactFinder.
> >
> > For example, for 2016 ACS 1-year data from table B08006 for Madison (WI):
> >
> > ###########
> > ## set geography to city of Madison, Wisconsin
> > Madison <- geo.make(state="WI", place = 48000)
> >
> > ## select only the total, car/truck/van, public transport, bicycle,
> > walk variables from table B08006
> > TransitVars <- acs.lookup(2016, span = 1, table.number = "B08006",
> > dataset = "acs")[c(1,2,8,14,15)]
> >
> > #fetch data for 2016 year and return them into acs object
> >
> > ACSData2016 <- acs.fetch(2016, geography = Madison,
> >                      variable = TransitVars,
> >                      col.names = c("Total", "Motor Vehicle", "Public
> > transit", "Bicycle", "Walked"))
> > ##########
> >
> > Just looking at the "total" column, I get 140,435 through ACS.r but
> > 146715 when looking up the same table and geography through
> > FactFinder. Similar differences exist for other years and the other
> > variables.
> >
> > I'm pretty new to R, and so it's entirely possible that I'm doing
> > something wrong, but I don't see an obvious explanation for the
> > discrepancy.
> >
> > Any hints would be appreciated.
> >
> > Thanks,
> >  Harald.
> > _______________________________________________
> > 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 <(617)%20253-2024> (w)
> 617.721.7131 <(617)%20721-7131> (c)
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.mit.edu/pipermail/acs-r/attachments/20180417/8fff5db8/attachment.html


More information about the acs-r mailing list