GithubHelp home page GithubHelp logo

opencongress / opencongress Goto Github PK

View Code? Open in Web Editor NEW
166.0 16.0 60.0 188.09 MB

Open Congress

Home Page: http://www.opencongress.org

License: GNU General Public License v3.0

Ruby 67.17% Shell 0.14% JavaScript 17.18% PHP 15.51%

opencongress's Introduction

OpenCongress - a Ruby on Rails application for displaying information about Congress


## Getting started with our code

A. Dependencies

Start by installing all the packages required by OpenCongress. The main dependencies are postgres and ImageMagick; OpenCongress will not run on mysql or sqlite. The following commands are suggestions, but ultimately you'll need to get postgres running to be able to run the app. We are currently running version of postgres 8.4.4 in production.

For Ubuntu:

sudo apt-get install postgresql postgresql-client postgresql-contrib libpq-dev ruby1.8 ruby1.8-dev rubygems libopenssl-ruby imagemagick libmagick9-dev gcj-4.4-jre

For Mac OS X, start by installing MacPorts, then run:

sudo port install postgresql84 postgresql84-doc postgresql84-server ImageMagick md5sha1sum wget

or, if you want to use Homebrew (this will install version Postgres 8.4.4):

brew install imagemagick
brew install https://github.com/adamv/homebrew-alt/raw/master/versions/postgresql8.rb

Follow the instructions after the packages install for initializing your database


Install the bundle:


[sudo] gem install bundler
bundle install

Note for OS X: *You may need to specify additional compile options for your gems. Try: ARCHFLAGS="-arch x86_64" bundle install

B. Database setup

Running the following commands will create an 'opencongress' user and empty databases for the three environments (test, development, production). The migration command will populate the development database with an empty schema.


rake db:init
rake db:migrate

C. Solr (optional, recommended)

OpenCongress uses Solr to store some data. Running Solr is not required to run the web server, but some pages will break if Solr is not running. If you are going to import data, running solr is required or you will encounter errors.

You can run Solr with the following command (usually in the background and/or in a separate window):

rake solr:start

D. Legislative Data (optional)

See note above about running Solr: it is required for importing data.

To import legislative data into your database, run the following command:

rake update:govtrack

This will download data files from Govtrack and import them into your database. The default location for storage of the data files is /tmp/opencongress_data but you can change this by editing config/application_settings.yml. This task will import ALL of the data for the current session of Congress: it will take a long time and occupy a LOT of space on your filesystem! Keep this in mind before importing the data!

E. Starting the server

See note above about running Solr: it is not required, but recommended.

To start the webserver:

rails s

We are actively working to make the install process easier for new volunteers. Special thanks to Doug Cole for moving us along in this regard.



Copyright (c) 2005-2012 Participatory Politics Foundation

OpenCongress is licensed, as a whole, under AGPLv3. Components added prior to OpenCongress version 3 (July 27, 2011) were and are licensed under GPLv3. All components added for or after OpenCongress version 3 are licensed AGPLv3. When you contribute a patch to OpenCongress, it will be licensed under AGPLv3. See LICENSE-AGPLv3 file for details.

opencongress's People

Contributors

agp avatar aross avatar d2d avatar davidmooreppf avatar dougcole avatar morganknutson avatar opencongress avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

opencongress's Issues

Have a glossary of bill status updates

When I look at a bill's progress through the houses, I see terms like

"Considered as unfinished business." or
"Considered under suspension of the rules."

Like myself, I imagine many others have no idea what this congressional jargon means.

It would be really helpful for the public if there were a mechanism to provide a translation for these phrases. A glossary would be easiest to implement, then a dynamic tooltip-style description/translation could make things easier for the reader.

User Profile Save Behavior (UI)

This is a more a UI complaint than a bug.
When updating information in my profile, certain changes require triggering an asynchronous save while others submit a form to reload the page. I would rather submit the changes the same asynchronous way.
Some of the profile changes in app/views/profile/_settings.html.erb use onclick or onchange handlers. I can also contribute a patch to resolve this issue.

Facebook Share popup causes strange movements.

I just used the website to sign a petition to my Congressmen, and I clicked to share it on Facebook. The window, when opened to full screen, kept flashing at bottom, and wouldn't allow me to type... like it was refreshing every few milliseconds. So, I reduced it back down and, with the same frequency, the window started dancing off to the the right of the screen, until it hit the right edge.

setup issues

when I try and run db:migrate I am getting the error:
'rake aborted oc_wiki database not configured'
what do I need to do to fix this?

Metadata

I've put up a screencast that illustrates the use of the MLZ variant of Zotero with OpenCongress.org. I hope that it will prove useful for analyzing and articulating the effects of complex or interlocking legislative changes. For anyone who would like to take the kit out for a spin, I've posted an announcement with installer links to accompany the screencast. Enjoy!

One of the things I had to deal with in assembling the Zotero translator (scraper) for OpenCongress.org was the absence of structured metadata. As mentioned in the announcement, it would be great if some structure could be given to the metadata embedded in the pages at some point. What I would suggest is a minimal-effort approach, just pegging existing blocks with static id attributes in the templates (#title, #date, #description, #session etc.). That would allow third-party tools like Zotero that have adaptive screen-scraping capability to pluck out the cite details independent of the page structure.

(As far as I know there isn't any workable standard for exchange of legal metadata around, so I actually wouldn't push any further than that; but node ids would definitely be helpful.)

API Person format changed

The pagination format for Person (but not bill) was changed in the API about a month ago. Basically it used to generate JSON like "people" => [Array of People], now it's generating {"person" => {}, "person" => {}, "person" => {}}.

It seems to me that either all of the objects need to adopt the new format or we should revert to the old format, of which I would vote for the latter (this actually happened about 10 months ago, and Taishan reverted it back to the old style then, but it appears to have happened again, link: opengovernment/govkit#8)

css bug

i noticed a bug with your home page while using Chrome ( 12.0.742.112 ) on Ubuntu ( 10.4 )

search_submit element is not aligned with the other half of the search field. easy fix is to add 2 pixels of margin-top:

search_submit {

float: left;
margin-top: 2px; // <---

Parser scripts should take a relative path

Right now they are hardcoded to take data from the /data directory in the root of the filesystem. I guess it would make more sense to have this data directory be relative to the OC application root instead (or make the scripts take a parameter). Makes it more self-contained and doesn't require extra permissions (usually only root can change the root directory).

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.