This repository has been archived by the owner. It is now read-only.
A pluggable GeoDjango app with the boundaries of United States counties.
Python JavaScript
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


8888888b.  888                                     888      888          888b     d888                            
888   Y88b 888                                     888      888          8888b   d8888                            
888    888 888                                     888      888          88888b.d88888                            
888   d88P 888 888  888  .d88b.   .d88b.   8888b.  88888b.  888  .d88b.  888Y88888P888  8888b.  88888b.  .d8888b  
8888888P"  888 888  888 d88P"88b d88P"88b     "88b 888 "88b 888 d8P  Y8b 888 Y888P 888     "88b 888 "88b 88K      
888        888 888  888 888  888 888  888 .d888888 888  888 888 88888888 888  Y8P  888 .d888888 888  888 "Y8888b. 
888        888 Y88b 888 Y88b 888 Y88b 888 888  888 888 d88P 888 Y8b.     888   "   888 888  888 888 d88P      X88 
888        888  "Y88888  "Y88888  "Y88888 "Y888888 88888P"  888  "Y8888  888       888 "Y888888 88888P"   88888P' 
                             888      888                                                       888               
                        Y8b d88P Y8b d88P                                                       888               
                         "Y88P"   "Y88P"                                                        888               

A pluggable GeoDjango app with the boundaries of United States counties. Geography, loosely coupled.

I gave a talk in December 2010 about why I think maps should be pluggable. I also released an example app you can find here.

Beware. This software is in beta testing and hasn’t been used much. But don’t let that stop you! Please try it and tell me what sucks.


  • A ready-to-serve model with all the counties in the United States
  • Geometry fields for three of the most common SRIDs.
  • Simplified geometry fields that thin down the data and make it easier to display many polygons on a single map.
  • A read-only admin for reviewing the data
  • Templates that show how the counties can be displayed with common browser-based mapping libraries.


Before you begin, you will need to have a Django project with GeoDjango’s ‘django.contrib.gis’ app installed and configured. The official installation guide is here. The official tutorial is here. Both are excellent.


01. Install the source code

You can download it from PyPi.

pip install latimes-pluggablemaps-uscounties

Or, pull the trunk from github

git clone git://

02. Install the app in your Django project

In’s INSTALLED_APPS tuple, add the following.


03. Create the database tables

From the shell, enter:

python syncdb

04. Load the data

From the same shell, enter the following. Then go get a cup of coffee because this takes forever. Sorry about that. Maybe this Denzel spoof can make up for it.

python loaduscounties

05. Check out the demonstration maps

In in your file’s urlpatterns tuple, add the following.

(r'^us-counties/', include('us_counties.urls')),

Check out the OpenLayers demo by visiting: