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.
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
.
Install geospatial libraries:
sudo apt-get install binutils libproj-dev gdal-bin
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.
From the opengovernment-local
directory:
billy-update pa-philadelphia --fastmode
billy-update ca-san-jose --fastmode --term 2011-2012 --term 2013-2014
For now, see the OpenStates documentation.
From the opengovernment-local
directory:
python site/manage.py runserver
- Browse the web version at http://127.0.0.1:8000/
- Consult the scraper dashboard at http://127.0.0.1:8000/admin/
- Use the API according to the OpenStates documentation
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