- Install python and pip
sudo pip install virtualenv
virtualenv env
source env/bin/activate
(you will have to do this every time you want to start working)pip install -r requirements.txt
- install mysql
If you've worked with Django and python before, these steps should be familiar to you.
You'll need python, pip, virtualenv.
Python 2.7.9 includes pip:
brew install python
pip install virtualenv
Mac: brew install mysql
mysql --user root
mysql> create database calaccess_raw;
mysql> \q
python disclosure-backend/manage.py migrate
First, a basic data check to make sure things are working:
$ python disclosure-backend/manage.py downloadcalaccessrawdata --use-test-data
$ python disclosure-backend/manage.py downloadzipcodedata
Netfile contains campaign finance data for a number of jurisdictions. Not all jurisdictions will have data.
$ python disclosure-backend/manage.py downloadnetfilerawdata
Cal-Access is the state data. It's ~750MB of data and takes about an hour to trim, clean and process.
$ python disclosure-backend/manage.py downloadcalaccessrawdata
ssh opencal.opendisclosure.io /usr/local/bin/deploy-backend