Skip to content
This repository has been archived by the owner on Jun 16, 2018. It is now read-only.

datadesk/latimes-pluggablemaps-uscounties

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

60 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation


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.

Features

  • 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.

Requirements

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.

Installation

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://github.com/datadesk/latimes-pluggablemaps-uscounties.git

02. Install the app in your Django project

In settings.py’s INSTALLED_APPS tuple, add the following.

'us_counties',

03. Create the database tables

From the shell, enter:

python manage.py 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 manage.py loaduscounties

05. Check out the demonstration maps

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

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

Check out the OpenLayers demo by visiting:

http://localhost:8000/us-counties/openlayers/

About

A pluggable GeoDjango app with the boundaries of United States counties.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published