GithubHelp home page GithubHelp logo

scopola / dvf-app Goto Github PK

View Code? Open in Web Editor NEW

This project forked from etalab/dvf-app

0.0 0.0 0.0 1.59 MB

Exploration des données DVF

Home Page: https://app.dvf.etalab.gouv.fr

License: Apache License 2.0

Python 10.52% CSS 4.57% JavaScript 46.41% HTML 36.86% Shell 1.65%

dvf-app's Introduction

Explorer les données de DVF (Demandes de Valeur Foncière)

La base de données DVF recense les mutations à titre onéreux (vente, vente en l'état futur d'achèvement, vente terrain à bâtir, échange, adjudication, expropriation) advenues les 5 dernières années.

L'application https://app.dvf.etalab.gouv.fr prend appui sur ces données et propose de visualiser les transactions à la maille de la parcelle cadastrale. Elle a été développée par l'équipe de la mission Etalab.

Nous lirons volontiers vos suggestions d'amélioration.

Les données de Mayotte ainsi que de l'Alsace et de la Moselle sont manquantes car gérées par le Livre Foncier et non par la DGFiP

Une API développée par Christian Quest est disponible ici, avec sa documentation.

Installation

1- Pré-requis

Il faut un serveur Linux (ici, nous prendrons Ubuntu 18.04 comme exemple)

2- Récupération du dépôt

$ git clone https://github.com/etalab/DVF-app
$ cd DVF

3- Installation minimale : pour développer l'interface utilisateur seule (Front End)

Pour participer au développement de l'interface utilisateur, il n'est pas nécessaire d'installer Python et PostgreSQL.

$ sudo apt-get update && sudo apt install nodejs
$ nodejs -v
v8.10.0 
$ curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
$ echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
$ sudo apt-get update && sudo apt-get install yarn
$ yarn --version
1.15.2

Un script Node.js permet de servir l'interface et de faire proxy vers l'API de production.

installation des dépendances Node.js

$ yarn

Démarrage du serveur Web (port 3000 par défaut)

$ yarn start

4- Suite de l'installation : pour développer l'ensemble de l'application (Full Stack: Back End + Front End)

PostgreSQL

$ sudo apt-get update && sudo apt install postgresql-10
$ psql -V
psql (PostgreSQL) 10.7 (Ubuntu 10.7-0ubuntu0.18.04.1)

Creation de la base de données et import des données :

Le script commence par créer une base de données PostgreSQL et une table, puis télécharge les données DVF retraitées par Etalab, disponibles ici. Enfin quelques post-traitements sont effectués (traitement de quelques minutes).

$ sh db/build_db.sh

Configuration de l'accès à la base de données

Dans la commande ci-dessous, remplacer par votre mot de passe.

$ sudo -u postgres psql
postgres=# \password postgres
Enter new password: <YOUR PASSWORD>
Enter it again: <YOUR PASSWORD>
postgres=# \q

$ echo -e "postgres\n<YOUR PASSWORD>\nlocalhost" > config.csv

Installation des packages pythons :

$ sudo apt-get update && sudo apt install python3
$ sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 10
$ sudo apt install libpq-dev python-dev
$ sudo apt install python3-psycopg2 python3-flask python3-pandas python3-sqlalchemy python3-psycopg2

Démarrage du serveur Web (port 5000 par défaut)

$ python app.py

Configuration

Certains paramètres peuvent être écrasés au moyen d'un fichier .env. Le fichier .env.sample est fourni en exemple.

Re-générer le fichier communes-mapping.json

yarn build-communes-mapping

dvf-app's People

Contributors

antoineaugusti avatar bzg avatar cvagner avatar jbledevehat avatar jdesboeufs avatar kriom avatar louisdecharson avatar marion-paclot avatar pimpin avatar pomeh avatar tmerlier avatar villfa avatar

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.