Giter Site home page Giter Site logo

opengovernment-local's Introduction

Open Government: Local

This is a temporary repository of scrapers written using Billy to collect legislative information from local governments in the United States.

Getting Started

To get started, you may re-use Open 13's excellent instructions, replacing open13 where appropriate. Briefly, if you already have Git, MongoDB, Python 2.7 and virtualenvwrapper 1.7 or greater, then fork this repository and run:

git clone https://github.com/YOURUSERNAME/opengovernment-local.git
cd opengovernment-local
mkvirtualenv oglocal --system-site-packages

If you are not using the boundary service described below, comment out the following line in requirements.txt:

-e git+http://github.com/rhymeswithcycle/represent-boundaries.git#egg=represent-boundaries

Run pip install -r requirements.txt and you should be ready to go!

Boundary Service

You do not need a boundary service to run the scrapers. GeoDjango is not compatible with PostGIS 2.0, so you must use PostGIS 1.5. PostGIS 1.5 is not compatible with PostgreSQL 9.2, so you must use PostgreSQL 9.0. On OS X, if you already have PostgreSQL 9.2 via Homebrew, run:

brew tap homebrew/versions
brew unlink postgis
brew install postgis15
initdb /usr/local/var/postgres9
cp /usr/local/Cellar/postgresql9/9.0.8/org.postgresql.postgres.plist ~/Library/LaunchAgents/
launchctl load -w ~/Library/LaunchAgents/org.postgresql.postgres.plist

Then you can run:

createdb -h localhost oglocal
psql oglocal -f /path/to/postgis.sql
psql oglocal -f /path/to/spatial_ref_sys.sql
cp local_settings.py.example local_settings.py

Then, edit local_settings.py with your PostgreSQL credentials and run:

python site/manage.py syncdb
python site/manage.py loadshapefiles

The repository for OpenStates' shapefiles is sunlightlabs/pentagon.

Running Scrapers

billy-update pa-philadelphia --fastmode
billy-update ca-san-jose --fastmode

Writing a Scraper

For now, see the OpenStates documentation.

Running the Site

python site/manage.py runserver

Bugs? Questions?

This project's main repository is on GitHub: http://github.com/opengovernment/opengovernment-local, where your contributions, forks, bug reports, feature requests, and feedback are greatly welcomed.

Copyright (c) 2012 Participatory Politics Foundation, released under the MIT license

opengovernment-local's People

Watchers

James Cloos avatar Jan avatar

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.