Exploring the distribution of wealth with data from the US Census API for the Aaron Swartz Memorial Hackathon
Ruby CoffeeScript JavaScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
app
config
db
doc
lib
public
script
test
vendor
.gitignore
Gemfile
Gemfile.lock
Procfile
README.md
Rakefile
config.ru

README.md

Cents us dollars them

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/

Setup

  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

AUTH_KEY=1111111111333333333333333333333777777777777

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'

'd3js-rails'

'bootstrap-sass'

Check out the Gemfile for more info

Misc

More stuff here soon...

Who's behind this?!

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