Skip to main content

# Pyris

IRIS INSEE Geolocalizer

Pyris try to collect data about [IRIS](http://www.insee.fr/fr/methodes/default.asp?page=zonages/iris.htm) from the French [INSEE](http://www.insee.fr/en/) institute. It’s possible from an address to find the IRIS code and some related data.

[IRIS](http://www.insee.fr/fr/methodes/default.asp?page=zonages/iris.htm) are specific codes and data related to more than 50,000 districts, built by the [National Institute of Statistics and Economic Studies](http://www.insee.fr/en/).

## Interactive Map

![map](./images/pyris-map.jpg)

## REST API documentation

![api](./images/pyris-doc-api.png)

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

IRIS shapes at https://www.data.gouv.fr/fr/datasets/contour-des-iris-insee-tout-en-un/

Go to the data directory and then:

  • ./01-download-data.sh

You have to install postgreSQL and PostGIS. For Debian:

sudo apt-get install postgresql postgis

Create a database name pyris with:

  • 02-create-database.sh

  • and 03-insert-data.sh to insert data

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;”

Test the insertion with a simple:

`sql SELECT gid,depcom,nom_com,iris,typ_iris FROM geoiris LIMIT 10; `

## 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](https://github.com/garaud/pyris/blob/master/app.yml)

Visit http://localhost:5555/pyris

## Requirements

  • postgresql

  • postgis

  • flask

  • flask restplus

  • psycopg2

  • slumber

  • pyaml

Metadata

Release files for pyris 0.6

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.6
File Size Uploaded
pyris-0.6.tar.gz 850.1 kB Details

Built distribution (wheel)

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

Total release size: 1.7 MB

Release files / pyris-0.6.tar.gz

Download URL pyris-0.6.tar.gz
Size 850.1 kB
Tags Source
SHA-256 checksum
How to use checksums
a655d2a0a67e1d928590f26a2b0470f9af11485945cff574e21900fff4f71c89
BLAKE2b-256 checksum
How to use checksums
84519f42545ef331024c011a5a395b3382db36501c33827ecb347a7c0387145c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

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

Download URL pyris-0.6-py3-none-any.whl
Size 866.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3f038ce0156b862d707802ef9272ecc2ed94208136cd9e89d67e3f5131617494
BLAKE2b-256 checksum
How to use checksums
4dad494e4ce50cd2eb57589f8120e98fedfe99171260dc7946f24d75ef5fd215
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

0.7.1

2 release files

0.7

2 release files

This release

0.6 This release

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