Skip to content
This repository


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Fetching latest commit…


Cannot retrieve the latest commit at this time

Octocat-spinner-32 app
Octocat-spinner-32 config
Octocat-spinner-32 db
Octocat-spinner-32 lib
Octocat-spinner-32 script
Octocat-spinner-32 spec
Octocat-spinner-32 vendor
Octocat-spinner-32 .gitignore
Octocat-spinner-32 .rspec
Octocat-spinner-32 .rvmrc
Octocat-spinner-32 CHANGELOG.txt
Octocat-spinner-32 Gemfile
Octocat-spinner-32 Guardfile
Octocat-spinner-32 LICENSE.txt
Octocat-spinner-32 Rakefile

AMEE Location Footprinter (A.L.F.)

With this app, you're able to sign in with your Foursquare account, and see the cumulative carbon footprint of your travels from checkin to checkin in your Foursquare history.

Licensed under the BSD 3-Clause license (See LICENSE.txt for details)

Authors: Chris Adams

Copyright: Copyright (c) 2011 AMEE UK Ltd




AMEE Location Footprinter (A.L.F.)

How to set this up

(Assuming you have bundler installed)

First clone the repo:

git clone

Then run bundler - it should fetch all the relevant dependencies

bundle install

Once you have this you'll need credentials from foursquare to allow users to grant access to their checkins, and you'll need an API key from AMEE to make carbon calculations.

Get your API keys


Once you're signed with Foursquare (we assume you have an account the service), head along to, And register the application name, website and callback url. You'll need these because Foursquare will redirect your browser back to this address once you've authenticated with them. The good news here is that because you are working from your browser, you can happily enter http://localhost:3000 (or as your home page url, and http://localhost:3000/user/callback (or as your callback url for testing and local development.

Once you have these set, add them to config/foursquare.yml like so:

defaults: &defaults
  client_id: YOUR_CLIENT_ID
  client_secret: YOUR_CLIENT_SECRET
  redirect_url: http://localhost:3000/user/callback

  <<: *defaults

  <<: *defaults

  <<: *defaults

Next fetch your credentials from AMEE, at You'll need to sign up (it's free), then create a Standard project, giving it a name and url to visit it at.

Click the name of your project and you'll be able to fetch the username and password from it, add add to the amee.yml file, like so:

defaults: &defaults
  password: YOUR_PASSWORD

  <<: *defaults

  <<: *defaults

  <<: *defaults
Set up your database:

Create your database, then run your migrations rake db:migrate or simply call rake db:schema:load to skip all the updates.


This has been tested with Rails 3.1.2, running on Ruby 1.8.7 and 1.9.2. Postgres is the default database adapter on this project (because this was developed to run on Heroku), but MySQL and SQLite should both work too.


Start your local server, then make sure you have the delayed job worker running with rake jobs:work, so that emails are sent in a different process to the main rails request-response cycle.

Voila! Your own version of location footprinter is setup. Now get hacking!

Something went wrong with that request. Please try again.