Search code examples
rcensus

Zip Code Demographics in R


I could get at my goals "the long way" but am hoping to stay completely within R. I am looking to append Census demographic data by zip code to records in my database. I know that R has a few Census-based packages, but, unless I am missing something, these data do not seem to exist at the zip code level, nor is it intuitive to merge onto an existing data frame.

In short, is it possible to do this within R, or is my best approach to grab the data elsewhere and read it into R?

Any help will be greatly appreciated!


Solution

  • In short, no. Census to zip translations are generally created from proprietary sources.

    It's unlikely that you'll find anything at the zipcode level from a census perspective (privacy). However, that doesn't mean you're left in the cold. You can use the zipcodes that you have and append census data from the MSA, muSA or CSA level. Now all you need is a listing of postal codes within your MSA, muSA or CSA so that you can merge. There's a bunch online that are pretty cheap if you don't already have such a list.

    For example, in Canada, we can get income data from CRA at the FSA level (the first three digits of a postal code in the form A1A 1A1). I'm not sure what or if the IRS provides similar information, I'm also not too familiar with US Census data, but I imagine they provide information at the CSA level at the very least.

    If you're bewildered by all these acronyms:

    1. MSA: http://en.wikipedia.org/wiki/Metropolitan_Statistical_Area
    2. CSA: http://en.wikipedia.org/wiki/Combined_statistical_area
    3. muSA: http://en.wikipedia.org/wiki/Micropolitan_Statistical_Area