Budget in a Box is a Django webapp for generating nice budget and spending visualization sites automatically from Budget Data Packages. Simply point BIAB at the URL of a valid BDP dataset and BIAB will create a site with rich visualization views of the data. New BDPs can be added to the site at any time.
The webapp is configured via environment variables:
OPENSPENDING_API_KEY
sets the access key for OpenSpending uploadingAWS_ACCESS_KEY_ID
sets the access key id for S3AWS_SECRET_ACCESS_KEY
sets the secret access key (sshh... don't tell anyone)BIAB_S3_BUCKET
sets the bucket name where all the CSV files and buckets will be storedBIAB_S3_HTTP
sets the URL for the HTTP fron of the S3 bucket. This is needed to serve the budget data packages from the web interfaceBIAB_S3_CSV_PREFIX
sets the prefix used in the keys for the CSV files on S3. Default is csv/.BIAB_S3_MODEL_PREFIX
sets the prefix used in the keys for the OpenSpending model metadata files. The metadata files will stored at {THIS PREFIX}{DATASET NAME}.json. Default is bdp/.
Create a virtualenv
run
pip install -r requirements.dev.txt
Initialize the database
DATABASE_URL=sqlite:///biab/biab.sqlite python biab/manage.py syncdb
DATABASE_URL=sqlite:///biab/biab.sqlite python biab/manage.py migrate
now start the instance with
DATABASE_URL=sqlite:///biab.sqlite honcho start