We are creating an application to help people visualize and analyze 311 data on one unified dashboard.
You will need all of the libraries to run GeoDjango. If you are so inclined, you can install most of these with homebrew. KyngChaos may also be a useful resource for MacOS X users.
- Set up a database using the PostGIS spatial database template.
- Rename settings_local.example.py to settings_local.py and set your db/secretkey variables.
pip install -r requirements.txt
python manage.py syncdb
creates the database schema.python manage.py update_db
imports initial data.- Generate GeoJSON files with
python manage.py geojson
git submodule update --init
adds bootstrap submodulepython manage.py runserver
Mapnik2's Wiki has instructions for installing Mapnik2 on Mac OSX and Linux. Dane Springmeyer recently released Mapnik2 binaries for Mac OSX.
To update data from the Open311 API, run python manage.py update_db
.
This command has a few options that may be useful. The first argument is
the end date, defaults to yesterday. The second argument is the number
of days to download previous to that date.
- Ex:
python manage.py updatedb 2011-07-01 30
will download the entire month of June.
To set up automatic updates (midnight every night):
crontab -e
- Insert
0 0 * * * /path/to/dir/manage.py update_db
There are a number API calls to return JSON in various forms.
/api
/tickets/(open|closed|both)
/[0-9]+
(n days previous to today)/YYYY-MM-DD(/[0-9]+)
(n days previous to the date)/YYYY-MM-DD/YYYY-MM-DD
(simple date range)
/more_info/YYYY-MM-DD
(single day)/YYYY-MM-DD
(range)
/list/YYYY-MM-DD
(singe day)/YYYY-MM-DD
(range)
Visit our project page.
Join the official Open311 Dashboard mailing list.