IRIS INSEE Geolocalizer
Pyris try to collect data about IRIS from the French INSEE institute. It's possible from an address to find the IRIS code and some related data.
IRIS are specific codes and data related to more than 50,000 districts, built by the National Institute of Statistics and Economic Studies.
IRIS shapes at https://www.data.gouv.fr/fr/datasets/contour-des-iris-insee-tout-en-un/
Get and insert data with:
data/download_data.sh
data/insert_data.sh
Data will be stored in a PostgreSQL database with the PostGIS extension. The
name of database is pyris
but you can change it in the insert_data.sh
.
You need to install PostgreSQL, PostGIS. For Debian:
sudo apt-get install postgresql postgis
Test the insertion with a simple:
SELECT gid,depcom,nom_com,iris,typ_iris
FROM geoiris LIMIT 10;
You can:
-
URL/iris/0104?limit=5
to the some information about a specific IRIS code -
URL/search/q=place de la bourse Bordeaux
to get the IRIS data from a specific address
First, download the few CSS & JavaScript dependencies with a bower install
(just a Bootstrap and jQuery).
The, specify the path to the YAML configuration file. Don't forget to set the user/password for the database access.
export PYRIS_APP_SETTINGS=/path/to/app.yml
See an example of a app.yml file
Then python run.py
in the pryis/api/
directory.
-
postgresql
-
postgis
-
flask
-
flask restplus
-
psycopg2
-
slumber
-
pyaml