Exploring the distribution of wealth in the United States with data from the US Census API for the Aaron Swartz Memorial Hackathon

See this live: http://cents-us-dollars-them.herokuapp.com/


  1. Clone a copy of the git repo to your local machine

    git clone git@github.com:cgcardona/cents_us.git

  2. Make sure you request an api key

  3. We're gonna wanna stash that api key somewhere private so that noone else can get their hands on it

Because I'm running the app on Heroku I'm using this method

Start by installing the foreman gem from heroku

gem install foreman

Foreman is a command-line tool for running Procfile-backed apps. It’s installed automatically by the Heroku Toolbelt, and also available as a Ruby gem.

You need to create a Procfile with something similar to the following:

web: bundle exec rails server -p $PORT

Now create a .env file with your config vars


Once you've got this set up then you start WEBrick with

foreman start

Also you'll want to put your auth key on heroku with

heroku config:add AUTH_KEY=1111111111333333333333333333333777777777777

Make sure to add .env to your .gitignore file so that your config vars don't get checked into version control

Sources of Data

US Census API Homepage

2010 Census Summary File 1 (SF1)

American Community Survey 5 Year Data

Gems we're using

This is a list of gems that I've added for this project. I'm not listing the gems that come out of the box with rails in the interest of brevity

'underscore-rails', '~> 1.4.3'

'haml-rails', '~>0.3.5'



Check out the Gemfile for more info


More stuff here soon...

Who's behind this?!

Relax. It's just me, Carlos Cardona. Follow me on Twitter

Thanks for reading! Follow me on Twitter and/or G+ for more.

See something wrong or got something to add/change? Fork this git repo and send me a pull request

If you particularly enjoy my work, I appreciate donations given with Gitcoin.co


27 January 2013