GitXplorerGitXplorer
e

evalmtl.js

public
0 stars
0 forks
9 issues

Commits

List of commits on branch master.
Unverified
a4bbd93b075e667d69d358125b0a80714d9532a7

Update to latest expressjs

eelecnix committed 11 years ago
Unverified
9777c176c231a52905dd59e2800ec1f8ba040655

README: Add street_id column

eelecnix committed 11 years ago
Unverified
5c14b19def59fdea3553f350f8cff730dd5f8849

Display list of properties on the selected street

eelecnix committed 11 years ago
Unverified
8e10604a7cfba2c1bc787a3c367e4d592ffd2611

Add street id to table.

eelecnix committed 11 years ago
Unverified
db32b2cb5e0f816b0bf8c6f63cb1b7ce702ec031

Display error message

eelecnix committed 11 years ago
Unverified
6618046ac005c46018cce691de89b77b46c55245

Order streets by name

eelecnix committed 11 years ago

README

The README file for this repository.

evalmtl.js

Web frontend for Évaluations foncières de Montréal.

1. Scrape and export to PostgreSQL

Follow instructions at https://github.com/elecnix/evalmtl

2. Create streets table

$ psql -d evalmtl
evalmtl=# CREATE TABLE streets AS SELECT row_number() OVER (ORDER BY street_name, arrondissement, municipalite) AS id, street_name, arrondissement AS borough, municipalite AS city FROM evaluations_2014 GROUP BY street_name, arrondissement, municipalite;
evalmtl=# ALTER TABLE streets ADD PRIMARY KEY (id);
evalmtl=# CREATE INDEX ON streets (street_name);
evalmtl=# ALTER TABLE evaluations_2014 ADD street_id integer;
evalmtl=# UPDATE evaluations_2014 SET street_id = (SELECT id FROM streets WHERE streets.street_name = evaluations_2014.street_name AND (streets.borough = evaluations_2014.arrondissement OR (streets.borough IS NULL AND evaluations_2014.arrondissement IS NULL)) AND streets.city = evaluations_2014.municipalite);
evalmtl=# CREATE INDEX ON evaluations_2014 (street_id);

3. Install node modules, assuming NPM is already installed:

npm install

4. Run!

DATABASE_URL=postgres://user:pass@localhost/evalmtl node app

Or push to Heroku:

heroku create
heroku addons:add heroku-postgresql:dev
git push heroku master
heroku open