Skip to content
This repository


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Library for working with the dataset made available for the Hacking Education contest

branch: master

This branch is 0 commits ahead and 0 commits behind master

Fetching latest commit…

Cannot retrieve the latest commit at this time



This library sprung from the 2011 Hacking Education contest for (

The DonorsChoose::Data module match up the normalized data provided by to classes that inherit from ActiveRecord::Base.

This gem assumes you have loaded the datasets into a PostgreSQL database and normalized the data. See the contest documentation for more information.


  gem install donors_choose
project = DonorsChoose::Data::Project.first
school = DonorsChoose::Data::School.last


If you’d like to use it in Rails, just add the following to your Gemfile:

gem 'donors_choose'

Stand alone

If you’d like to use it stand alone, do the following:

Create a database.yml, very similar to what you’d have in Rails:

adapter: postgresql
host: localhost
username: postgres
password: password
port: 5432
database: donors_choose_data
schema_search_path: public

Then, drop into irb, require the gem, and establish the db connection

terminal$ irb
irb(main):001:0> require 'rubygems'
irb(main):001:0> require 'donors_choose'
irb(main):001:0> DonorsChoose::Data.connect(YAML.load('database.yml')))
irb(main):001:0> DonorsChoose::Data::Project.first
Something went wrong with that request. Please try again.