Coder Social home page Coder Social logo

adamhaney / geodjango-tigerline Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jlillest/geodjango-tigerline

1.0 2.0 1.0 29 KB

A resuable app with the boilerplate necessary for getting TIGER/LINE data into a GeoDjango project.

License: BSD 3-Clause "New" or "Revised" License

Python 100.00%

geodjango-tigerline's Introduction

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.10 and PostGIS + PostgreSQL.

Install
-------

Download the 2016 Tigerline files for all zipcodes, all states, and all counties

ftp://ftp2.census.gov/geo/tiger/TIGER2016/

* States - ftp://ftp2.census.gov/geo/tiger/TIGER2016/STATE/tl_2016_us_state.zip
* Counties - ftp://ftp2.census.gov/geo/tiger/TIGER2016/COUNTY/tl_2016_us_county.zip
* Zipcodes - ftp://ftp2.census.gov/geo/tiger/TIGER2016/ZCTA5/tl_2016_us_zcta510.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`

geodjango-tigerline's People

Contributors

adamfast avatar adamhaney avatar issackelly avatar jlillest avatar

Stargazers

 avatar

Watchers

James Cloos avatar  avatar

Forkers

samrose

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.