Skip to content
Snippets Groups Projects

Predihood

Predihood is an application for visualizing IRIS (administrative areas defined by the French institute of statistics, they can be considered as neighbourhoods) and indicators which describe them (e.g. number of bakeries, average income and even the number of houses over 250m^2).

Statement of need

Finding a real estate in a new city is still a challenge. We often arrive in a city we don't know, thus finding the perfect living place becomes complex. Nearby public transport on one hand, a rural landscape on the other hand, an animated neighbourhood for some, far from urban hustle and bustle for others: there are many criteria for choosing your future neighbourhood. Our approach Predihood aims at facilitating the comparison between neighbourhoods. It defines and predicts the environment of any neighbourhood in France using supervised learning.

Installation instructions

Requirements

  • Python, version >=3
  • MongoDB, version >=4 for importing the database about neighbourhoods.

Installation

For installing Predihood, type in a terminal:

python3 -m pip install -e predihood/ --process-dependency-links

This command install dependencies, including mongiris, a lightweight API which enables the querying of the MongoDB database containing information about French neighbourhoods.

Next, to install the database, execute this command (from the MongoDB's executables directory if needed):

./mongorestore --archive=/path/to/dump-iris.bin

where /path/to/ is the path to the dump file of the IRIS collection (provided with the package mongiris in mongiris/data/dump-iris.bin).

Run Predihood

For running Predihood, type in a terminal:

python3 main.py

After some information, the terminal displays the URL for testing Predihood : http://localhost:8080/.

Example usage

For the cartographic interface, an example would be:

  1. Type a query in the panel on the left, e.g. "Lyon". This will display all neighbourhoods that contain "Lyon" in their name or their township.
  2. Click on a neighbourhood (which are the small areas in blue). A tooltip will appear with some information about the neighbourhood. There are more informations when clicking on the "More details" link.
  3. In order to predict the environment variables, you have to choose the classifier. The "Random Forest" classifier is recommended by default. After some seconds, predictions will appear in the tooltip. This will help you for comparing neighbourhoods between them.s

For the algorithmic interface, an example would be:

  1. Choose an algorithm
  2. Tune it as desired
  3. Click on "Train, test and evaluate" button. When computing accuracies is done, a table shows results for each environment variable and each list of indicators.

Tests

Tests are in tests.py file.