Skip to content

Commit

Permalink
Update instructions.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jay Bienvenu committed Sep 9, 2016
1 parent 217408b commit 7d3fc00
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,15 @@ zoomed to my address).
As a developer,
I want to store the 311 data in a database so we can query it more efficiently.

## prerequisites

We recommend using Homebrew to install components on the Mac.

* Postgres database.
* Postgis.

If you do not already have these components installed, ask someone on the project to help you get it installed on your machine.

## get the data

```
Expand All @@ -27,15 +36,18 @@ wget -O 311-calls.csv 'https://data.nola.gov/api/views/3iz8-nghx/rows.csv?access
## create the db

```
brew install postgres ## if not already installed
brew install postgis ## if not already installed
createuser three11
createdb three11 -O three11
psql -U postgres -d three11 -c "create extension postgis;"
psql -d three11 -c "create extension postgis;"
```

## load data into db

```
# ogr2ogr is a useful tool for working with geospatial data
brew install gdal --with-postgres ## if not already installed
ogr2ogr -f PostgreSQL PG:"host='localhost' dbname='three11' user='three11'" 311-calls.csv -nln calls
# add location column
Expand Down

0 comments on commit 7d3fc00

Please sign in to comment.