[acs-r] Best way to visualize ACS data?

Ezra Haber Glenn eglenn at MIT.EDU
Mon Jul 15 17:08:40 EDT 2013


Dear Anon RUser:

Thanks for your question -- answers below.

1) Concerning the use of the package to create choropleth maps, this
   is really more of a question for the ggplot2/maps packages than for
   the acs package.  As for tract-level data in particular, any data
   you download via acs.fetch() -- including the tract data from that
   example -- should be able to be fed into the these mapping
   functions, but I don't believe that they currently support mapping
   of tract boundaries at this point.

   From what I can tell, the maps package and the map_data() function
   do include support for county level maps in the US, so you could
   definitely try that.  I've just added an example of this on the
   CityState blog -- see
   <http://eglenn.scripts.mit.edu/citystate/2013/07/using-acs-r-to-create-chorpleth-maps/>
   for more.

2) As for how Census table numbers relate to the questions in the
   surveys they use, this is a pretty complicated one, and there is no
   easy answer.  Census tables do not simply tabulate
   question-by-question answers, but instead tabulate results across
   questions.  To help you find the tables you want, the acs package
   does include a special "acs.lookup" helper function, which will
   take text strings to search for in with table names or variable
   keywords -- see ?acs.lookup for more.

Thanks for the feedback and query, and I this helps.

--Ezra

At Fri, 5 Jul 2013 16:32:43 -0700, Anon RUser wrote:
> 
> [1  <multipart/alternative (7bit)>]
> [1.1  <text/plain; ISO-8859-1 (7bit)>]
> 
> [1.2  <text/html; ISO-8859-1 (quoted-printable)>]
> Hello,
> 
> I was very excited to learn about the R ACS package and think that
> it can be extremely useful for me.  I would like to create
> visualizations of demographic data.  For example, on Ezra's blog he
> explains how to get all census tract population data for Middlesex
> county:
> 
> > my.tracts=geo.make(state="MA", county="Middlesex", tract="*") 
> > acs.fetch(geography=my.tracts, table.number="B01003")
> 
> I have two questions:
> 
> 1.  I would like to turn this data into a choropleth, but don't know
> how.  I have created choropleths using ggplot2 as described in the R
> Graphics Cookbook
> (http://www.amazon.com/R-Graphics-Cookbook-Winston-Chang/dp/
> 1449316956).  There they call ggplot2's "map_data()" function.  But
> while map_data can accept "usa" or "county", I don't think that it
> supports census tracts, so I don't know how to create a choropleth
> of this data.
> 
> 2.  How does table.number correspond to ACS question number?  I
> found what appears to be a complete list of ACS questions here:
> http://www.census.gov/acs/www/about_the_survey/questions_and_why_we_ask/
> 
> How do these questions map to the table.number parameter?  For
> example, I would like to make a choropleth showing the ratio of
> people in Middlesex county who speak a language other than English
> at home (ie "% of people answering 'yes' to question 14(a)").  I
> don't know how to translate this to a table.number.
> 
> Thank you very much!
> 
> 
> [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-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