Git Product home page Git Product logo

councilmatic's Introduction

Councilmatic! Build Status

City Council Legislative Subscription Service.

Contact Us

Getting Started

IMPORTANT: If you are interested in setting up Councilmatic for your city, you'll want to start with a sample local instance. In most cases, this is the right place to start. If instead you are interested in making modification to the core of Councilmatic, proceed with these instructions.

Installation

First check out the project code.

git clone git://github.com/codeforamerica/councilmatic.git

We recommend setting up a virtual environment for working with any project, so that you can manage your project-specific dependencies. This is optional but recommended:

virtualenv env --no-site-packages
source env/bin/activate

Next, install the requirements for Councilmatic (we recommend working in a virtual environment, but it's not strictly necessary).

$ pip install -r requirements.txt

Be sure to also install the scraper library for your city's legislative management system. For cities using Granicus's latest version of Legistar, this will be @fgregg's https://github.com/fgregg/legistar-scrape.

Non-Python requirements include:

  • pdftotext and pdftohtml (use apt-get install poppler-utils on Ubuntu)

Legislation source

Copy the file councilmatic/local_settings.py.template to councilmatic/local_settings.py. Fill in the LEGISLATION setting in this file. By default, it is set up to scrape from Philadelphia's legislation system.

Database

Create a database for Councilmatic. Typically this is done like:

createdb -T template_postgis councilmatic

where template_postgis is the name of your PostGIS database template. If you do not yet have one, you can find instructions for getting your system ready for Django and PostGIS online. For example, here are instructions for Mac, and Ubuntu. For other platforms, and for further instructions, the GeoDjango docs are a good place to look.

NOTE that PostGIS 2.0 is not compatible with Django 1.4. As Councilmatic is currently not set up to run on Django 1.5, you should install PostGIS 1.5

Set up the project database and populate it with city council data (when the syncdb command prompts you to create an administrative user, go ahead and do so). There is a lot of data to be loaded, so downloading it all may take a while.

cd local-councilmatic-sample
python manage.py syncdb # Create admin account when prompted.
python manage.py migrate
python manage.py updatelegfiles
python manage.py rebuild_index # For searches. Say yes when prompted.
python manage.py collectstatic # For js and css. Say yes when prompted.

Development server

Finally, to run the server:

$ python manage.py runserver

Now, check that everything is working by browsing to http://localhost:8000/. Now browse to http://localhost:8000/admin and enter the admin username and password you supplied and you should have access to all of the legislative files!

Architecture

The core of Councilmatic is implemented as a Django app. It cannot be run without a Django project. The local-councilmatic-sample folder contains a minimal Django project.

Copyright

Copyright (c) 2010 Code for America Laboratories See LICENSE for details.

Code for America Tracker

councilmatic's People

Contributors

mjumbewu avatar derekeder avatar fgregg avatar joshmarcus avatar non avatar corydissinger avatar danmelton avatar joannecheng avatar matthewloveless avatar migurski avatar mildmojo avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.