Skip to content

Latest commit

 

History

History
83 lines (53 loc) · 2.57 KB

README.md

File metadata and controls

83 lines (53 loc) · 2.57 KB

Open Government: Local

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

Note: Billy is officially depreciated. We do not currently recommend opengovernment-local to be used as a part of new projects.

Getting Started

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

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!

Note: If you encounter the error Error: pg_config executable not found., the quick solution is to create a symlink to pg_config.

Boundary Service

Linux

Install geospatial libraries:

sudo apt-get install binutils libproj-dev gdal-bin

All operating systems

Then, from the opengovernment-local directory, you can run:

cp site/local_settings.py.example site/local_settings.py

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

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

The repository for OpenStates' shapefiles is sunlightlabs/pentagon.

Running Scrapers

From the opengovernment-local directory:

billy-update pa-philadelphia --fastmode
billy-update ca-san-jose --fastmode --term 2011-2012 --term 2013-2014

Writing a Scraper

For now, see the OpenStates documentation.

Running the Site

From the opengovernment-local directory:

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