Skip to main content

INSEE/IRIS geolocalization

Project description

IRIS Insee Geolocalizer

Pyris collects some data about IRIS from the French INSEE institute. It’s possible from an address to find the IRIS code and some statistics data, e.g. population, employment or housing data.

IRIS are specific codes and data related to more than 50,000 districts, built by the National Institute of Statistics and Economic Studies.

Interactive Map



IRIS stats

Some Insee stats for each IRIS, census 2013: population (by sex and age), employment and housing.



REST API documentation



For instance, 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


You have to install postgreSQL and PostGIS. For Debian:

sudo apt-get install postgresql postgis

You have to be a PostgreSQL superuser to create the postgis extension for your database. If it’s not the case, you can do:

  • su

  • su - postgres

  • psql pyris -c "CREATE EXTENSION postgis;"

All usefull scripts are in the scripts-data folder. Two steps:

  • Download and some data processing for IGN and Insee data. Take a look to the Makefile in scripts-data.

  • Then load data into your database thanks to the Python script

To summarize, in a dedicated virtualenv, do:

  1. Go to scripts-data

  2. Run make all

  3. Run python ./data

For Python dependencies which help you to process data, take a look to the scripts-data/requirements.txt file.

You also have a configuration file example at scripts-data/settings.ini.sample.

Launch the Web App

First, download the few CSS & JavaScript dependencies with a bower install (just a Bootstrap and jQuery).

Then : > gunicorn -b or > gunicorn -b --env PYRIS_APP_SETTINGS=./appdev.yml if you have to specify db credentials or logging Flask app configuration.

See an example of a app.yml file

Visit http://localhost:5555/pyris

Launch the Unit Tests

You must set the database and have a YAML configuration inspired from app.yml (db name and credentials, etc.). You should copy the app.yml file and modify it. Then, you can use pytest:

PYRIS_APP_SETTINGS=appdev.yml pytest -v -rsf


  • postgresql

  • postgis

  • flask

  • flask restplus

  • psycopg2

  • slumber

  • pyaml

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyris-0.7.1.tar.gz (851.9 kB view hashes)

Uploaded source

Built Distribution

pyris-0.7.1-py3-none-any.whl (867.7 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page