GithubHelp home page GithubHelp logo

jgilliam / hellocongress Goto Github PK

View Code? Open in Web Editor NEW
4.0 2.0 1.0 421 KB

Hello Congress tells members of Congress what their constituent's priorities are, and encourages staffers to request research from their constituents. A mashup of White House 2 and the Sunlight Labs API.

Home Page: http://hellocongress.org/

Ruby 48.32% JavaScript 51.68%

hellocongress's Introduction

Hello Congress tells members of Congress what their constituent's priorities are, and encourages staffers to request research from their constituents.

This is built with Ruby on Rails and uses the White House 2 API (http://whitehouse2.org/) for the priorities, and the Sunlight Labs API for legislator information. 

It's live here:  http://hellocongress.org/

To install:

git clone git://github.com/jgilliam/hellocongress.git
git submodule init
git submodule update

You will need to copy database.yml.dist to database.yml and set your database settings like you would any Rails app.  Also copy hc.yml.dist to hc.yml and add in your own Google Analytics code, etc.

This will create the database, run the migrations, and set up the initial data:

rake db:create db:migrate
rake sunlight:legislators wh2:legislators wh2:issues

Then you need to run these two rake tasks once day to keep the priorities for each legislator up to date, and track how it's changing over time.

rake wh2:priorities rank:priorities

That should be it, feel free to contact me if you have any problems.   Mostly the code is useful as an example for how you could use the White House 2 API with ActiveResource.   It uses dweinand's version of will_paginate to handle pagination with ActiveResource.  When you run the git submodule commands, it will load up that for you as well.

hellocongress's People

Contributors

jgilliam avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

sggbtech

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.