Skip to main content

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

map

map

IRIS stats

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

iris-stats

iris-stats

REST API documentation

api

api

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

Data

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 loader.py.

To summarize, in a dedicated virtualenv, do:

  1. Go to scripts-data

  2. Run make all

  3. Run python loader.py ./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 127.0.0.1:5555 pyris.api.run:app or > gunicorn -b 127.0.0.1:5555 --env PYRIS_APP_SETTINGS=./appdev.yml pyris.api.run:app 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

Requirements

  • postgresql

  • postgis

  • flask

  • flask restplus

  • psycopg2

  • slumber

  • pyaml

Metadata

Release files for pyris 0.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyris 0.7
File Size Uploaded
pyris-0.7.tar.gz 1.3 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for pyris 0.7
File Interpreter ABI Platform
pyris-0.7-py3-none-any.whl Python 3 none any Details

Total release size: 2.7 MB

Release files / pyris-0.7.tar.gz

Download URL pyris-0.7.tar.gz
Size 1.3 MB
Tags Source
SHA-256 checksum
How to use checksums
b2367102ef0147a13bb5a1b219d0fab8ab3221fb749fefb6bbca58a8d1ad28a9
BLAKE2b-256 checksum
How to use checksums
708926da85ce7895ed7a5cbdf16a52bf33e721fe7361bcf098b900adadf9805a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/44.0.0 requests-toolbelt/0.8.0 tqdm/4.43.0 CPython/3.8.2

Release files / pyris-0.7-py3-none-any.whl

Download URL pyris-0.7-py3-none-any.whl
Size 1.3 MB
Tags Python 3
SHA-256 checksum
How to use checksums
79c10eed64f6d527c510d78d98f6e13882f3fcb28bb38e4c40c84e324b5683f9
BLAKE2b-256 checksum
How to use checksums
40e5db1db767345fa4fa13fa7a99f640336b95f97ea0bc8533d9574c2d365bf8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/44.0.0 requests-toolbelt/0.8.0 tqdm/4.43.0 CPython/3.8.2

Release history Release notifications | RSS feed

0.7.1

2 release files

This release

0.7 This release

2 release files

0.6

2 release files

0.5

1 release file

0.4

1 release file

0.3

1 release file

0.2

1 release file

0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page