A resuable app with the boilerplate necessary for getting TIGER/LINE data into a GeoDjango project.
Project description
This app is intended to make it easier to add TIGER/Line data to a GeoDjango project and save people from writing this same code over and over (collectively).
It is not (yet) exhaustive, it’s just what I had and have needed in the past. If you have models / load scripts for other data in the set, please fork/add and send me a pull request if you add other shapefiles. If you come up with useful manager methods, I’d love to see those too.
NOTE: If you need cities, the best source for that is the US National Atlas. I have an app for those at https://github.com/adamfast/usgsdata-citiesx020
It’s been tested and used with Django 1.8 and PostGIS + PostgreSQL. I’ve used it with other versions since 1.1 over time but it’s probably best on 1.6+ now.
Install
Download the 2015 Tigerline files for all zipcodes, all states, and all counties
ftp://ftp2.census.gov/geo/tiger/TIGER2015/
Zipcode Tabulation Areas (for all states) - see ZCTA5/ folder, download tl_2015_us_zcta510.zip
States (and Equivalents) (for all states) - see STATE/ folder, download tl_2015_us_state.zip
Counties (and Equivalents) (for all states) - see COUNTY/ folder, download tl_2015_us_county.zip
Unzip the files
Configure django.contrib.gis as described in the django docs.
Add “django.contrib.gis” and “tigerline” to INSTALLED_APPS
run python manage.py migrate which will run the migrations and make sure database tables are created.
If you want to import all three: run python manage.py load_tigerline –path=~/Path/to/shapefiles
Or there are individual management commands if you only need one set: run python manage.py load_counties –path=~/Path/to/shapefiles run python manage.py load_states –path=~/Path/to/shapefiles run python manage.py load_zipcodes –path=~/Path/to/shapefiles
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Hashes for geodjango-tigerline-1.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | e7bbcd27fe2924680adc15723acf6bc290e190c5d231815440a58bd95036e071 |
|
MD5 | 4e87480f4d52d4d55b4a0561c192e095 |
|
BLAKE2b-256 | 0e65bdd7f356ac65ef2af02b39ab3fab25a56619bf6f90507ded5bb953577b03 |