Skip to content

opengovernment/opengovernment-local

Repository files navigation

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

About

Legislative information from local governments in the United States

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published