Tuesday, April 5, 2011

FIPS Maps and Census Data

The purpose of this post is to demonstrate the ability to map census data in Tableau. I am at once both excited and disheartened about the United States census.gov website. I am excited because they do a great job of collecting the data - far better than many other countries, it seems. Disheartened because they then proceed to bury the data inside of massive amounts of excel files, with arcane naming conventions, master key lookup files, and what have you.

An ongoing project of mine will be to slowly amass this information into one unified view. This will exceed the capacity of Tableau Public, of course.

Anyway, the first step was to convert the FIPS codes as represented in shapefile format, to a valid polygon format that Tableau can understand. (This subject has been covered elsewhere in this blog as well as on the web). Notes: I provided Tableau with a copy of this polygon file, and you can download it here. FIPS code = US Counties. The Census download website is here. The income and poverty excel file is here. And the master key excel file is here.



Andy said...

That's very cool, Mr Smithee.

Apart from the great polygon work, one thing this highlights is how desperately Tableau needs better projections on its maps. If you choose (All) in the region filter, the projection is a bit ridiculous by anyone's standards: Alaska dwarfs everyone else in an almost comical way.

Any chance you can work your influence to get things changed in some way?

Steve Wexler said...

Indeed, very cool.

And Andy is absolutely right about the the projection problem -- or shall we call it the Alaska/Hawaii problem -- Mr. Smithee solves this in the Gainer / Decliner visualization by separating Alaska and Hawaii.

Three years ago I asked Tableau to consider a "Rand-McNally" type option that would cut out Alaska and Hawaii.


northwestcoder said...

No real arguments, guys.

I suppose I could also just remove the "all" choice from that filter... would that help?


Projections remain a tough one. I have added two new views to this book: the first is a nasa WMS layer which projects differently, and it seems, more correctly. The second is an image of how Alaska fits into the lower USA.

But again, no arguments to the general concepts mentioned!


Andy said...

nice update, Alan. What your update has shown, which I didn't previously know, is that the projection is down to the WMS being used, not Tableau. So, if there's a WMS that uses a Peter's Projection, for instance, Tableau would adjust to that?

northwestcoder said...

Need to check on this, but my understanding is as follows: When in the built-in "online" mode, Tableau uses EPSG:3857
(see http://spatialreference.org/ref/sr-org/6864/ or similar)

And when in WMS mode, Tableau uses EPSG:4326 (see http://spatialreference.org/ref/epsg/4326/ or similar)