GitXplorerGitXplorer
e

evalmtl.js

public
0 stars
0 forks
9 issues

Commits

List of commits on branch master.
Unverified
434f0dce18f599f5d1f6aff4dc95dbaf2d24daf3

Limit to 50 search results

eelecnix committed 11 years ago
Unverified
289fb87cf1f382c72f76bdc55e27e1698a9be829

Remove placeholder

eelecnix committed 11 years ago
Unverified
1a0f8ae9f9e50cf007fc1282b0dc4214bd9af17c

Show only street name

eelecnix committed 11 years ago
Unverified
9550b85404d2c6eb24006b7a5e7c1f434b8ab60a

Spinner while loading streets

eelecnix committed 11 years ago
Unverified
796bbe6611b8b37dd632af905c8c78e25d259864

Set a title

eelecnix committed 11 years ago
Unverified
42300d3f5289f673785965b0910b731b557c345d

Search streets with Restangular

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