Giter Site home page Giter Site logo

evalmtl.js's Introduction

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

evalmtl.js's People

Contributors

elecnix avatar

Watchers

James Cloos avatar  avatar

evalmtl.js's Issues

Show streets on map

When searching for a street, display matching streets on a map. Draw line from lowest numeric address to highest numeric address.

Show properties on map

When selecting a street, display a map with the street shown as a line. As adresses are geocoded, refine the line in a polyline. Start with endpoints, then center, and keep dividing in halves at each iteration until 10% properties are geocoded to get a better fit.

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.