Skip to content


Subversion checkout URL

You can clone with
Download ZIP
A Django app that tracks the population of Cook County Jail over time and summarizes trends.
Python Shell
branch: stable

This branch is 303 commits behind master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.

Cook County Jail inmate tracker

A Django app that tracks the population of Cook County Jail over time and summarizes trends.

Using the API

See the API guide for accessing the production API service and querying the data.

Setting up for local development


git clone
cd cookcountyjail
pip install -r requirements.txt

Running it locally

After you've checked out the source code repository, you need to install the requirements. You are strongly encouraged to create a virtual environment before installing them.

To install the requirements, you should have [pip]( installed. If you made a virtual environment, this is already done for you.

pip install -r requirements.txt

By default, the locally running application uses the [sqlite]( database, which is often already installed on modern operating systems. Assuming you have it available, you may now initialize the application database:

./ syncdb --noinput
./ migrate countyapi

Running the scraper locally

Once you've set up the database, you need to run the scraper to populate the database with records. The scraper is invoked with a management command:

./ scrape_inmates

Other useful commands

./ check_inmate
./ clone_db
./ generate_datebase_audit_script
./ generate_search_for_discharged_inmates_cmds
./ generate_summaries
./ inmate_details
./ inmate_utils
./ look_for_missing_inmates
./ poll_inmates
./ scrape_inmates
./ utils
./ validate_inmate_records

scrape_inmates also supports a --limit / -l flag which limits the number of records created and --search / -s flag which overrides the default A-Z search strategy.

Cloning the database

If you'd like to copy all of the data that this project has scraped into your local database, you can run this command. It takes a while!

./ clone_db

Running the API server locally

./ runserver

You'll be able to use a browser to go to http://localhost:8000 where you'll see the welcome page, or to http://localhost:8000/api/1.0/?format=json to see that the API is basically functional.


Licensed under the GNU General Public License Version 3. See


See for contributors.

Something went wrong with that request. Please try again.