Skip to content
Visualizing and analyzing Open311 data on one unified, customizable dashboard http://codeforamerica.org/?cfa_project=open311-dashboard
Python JavaScript
Find file
Pull request Compare This branch is 165 commits ahead, 216 commits behind codeforamerica:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
dashboard
.gitignore
README.mkd
__init__.py
manage.py
requirements.txt
settings.py
settings_local.example.py
urls.py

README.mkd

Open311 Dashboard

We are creating a set of interactive widgets to help people visualize and analyze 311 data on one unified dashboard.

Non-Python Requirements

Basically, you 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.

Getting Started

  1. Set up a database using the PostGIS spatial database template.
  2. Rename settings_local.example.py to settings_local.py and set your db/secretkey variables.
  3. pip install -r requirements.txt
  4. python manage.py syncdb creates the database schema.
  5. python manage.py update_db imports initial data.
  6. Generate GeoJSON files with python manage.py geojson
  7. python manage.py runserver

A Word on Mapnik

Mapnik is a real pain to install. The TileMill homepage has resources and packages for installing Mapnik2 on Mac and Ubuntu.

Database Update Script

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):

  1. crontab -e
  2. Insert 0 0 * * * /path/to/dir/manage.py update_db

API Access

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)

More Information

Visit our project page and our homepage.

Join the official Open311 Dashboard mailing list.

Code for America Tracker

Something went wrong with that request. Please try again.