Skip to content
This repository

A database of the built environment in Chicago

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 downloads
Octocat-spinner-32 import
Octocat-spinner-32 scrapers
Octocat-spinner-32 sql_init_scripts
Octocat-spinner-32 util
Octocat-spinner-32 .gitignore
Octocat-spinner-32 README.md
Octocat-spinner-32 data_portal.py
Octocat-spinner-32 datasets_core.py
Octocat-spinner-32 datasets_secondary.py
Octocat-spinner-32 setup_edifice.py
README.md

edifice

A database of the built environment in Chicago using open data

Requirements

  • PostgreSQL (9.0.x or later; 9.1.x+ preferred)
  • PostGIS (2.0.x or later)
  • Python (2.7.x or later)
  • wget
  • psycopg2

Using setup_edifice.py

setup_edifice.py is used to recreate the edifice database on a system with a PostgreSQL database installed (with PostGIS 2.0.x+ support).

Drop and recreate from scratch a base_postgis template database, using the 'postgres' admin user.

python setup_edifice.py --create_template

Drop and recreate from scratch an edifice database struture, using the 'edifice' user.

python setup_edifice.py --create

Download (~165mb), unzip, and import City of Chicago data into the edifice database. [NOTE: WORK IN PROGRESS]

python setup_edifice.py --data

Optional flags:

  • --bindir [DIRNAME]: specify the location of PostgreSQL binaries such as pg_config, psql, etc.
  • --user [USERNAME]: use a username other than 'edifice' as the owner of the main database.
  • --database [DBNAME]: use a name other than 'edifice' for the main database.
  • --delete_downloads: delete downloaded zip and csv files after import
  • --help: provide usage info

Data Sources

Google Doc of data sources we are using

QGIS and TileMill

Once you are done setting up your Edifice database, you can use the following tools (including psql) to explore the datasets.

QGIS is a free, open-source GIS application that can connect directly to a PostGIS database and display and analyze geographic data.

TileMill is a map-design studio that can also connect directly to a PostGIS datastore and create interactive web maps using OpenStreetMap as the base layer.

Something went wrong with that request. Please try again.