Pyris
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.
Running instance http://pyris.datajazz.io/
API documentation at http://pyris.datajazz.io/doc/
Interactive Map
map
IRIS stats
Some Insee stats for each IRIS, census 2013: population (by sex and age), employment and housing.
iris-stats
REST API documentation
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:
Go to scripts-data
Run make all
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
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
Requirements
postgresql
postgis
flask
flask restplus
psycopg2
slumber
pyaml
Metadata
Release files for pyris 0.7.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| pyris-0.7.1.tar.gz | 851.9 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pyris-0.7.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 1.7 MB
Release files / pyris-0.7.1.tar.gz
| Download URL | pyris-0.7.1.tar.gz |
|---|---|
| Size | 851.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2f0a5f807d82b57e4844d7e14744d6f858eb78d1424baf03757dd0ac9da86f14
|
|
BLAKE2b-256 checksum How to use checksums |
0c5f522179129464570982b4639c71085c5a7dbca8156e8504f5679f1d5776eb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.4.2 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.8.0 tqdm/4.43.0 CPython/3.8.2
|
Release files / pyris-0.7.1-py3-none-any.whl
| Download URL | pyris-0.7.1-py3-none-any.whl |
|---|---|
| Size | 867.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
075c9c0b7e807a61c4f787e0f6255582e90c0400ceb57de927000fcfb3d752f0
|
|
BLAKE2b-256 checksum How to use checksums |
77c7b688b1e3ba4035fa85dff52118d4c38f52a139fb1c2583720e6b3ac75aaa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.4.2 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.8.0 tqdm/4.43.0 CPython/3.8.2
|
Security for pyris 0.7.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.