Get code IRIS from GPS points or addresses
Project description
Note: This library is currently in beta and may contain bugs. Please use it with caution.
This repository provides an easy solution to determine which IRIS zone (Ilots Regroupés pour l'Information Statistique) corresponds to a set of GPS coordinates. It also includes utilities to plot maps with IRIS contours, enrich IRIS-specific data, and manage external data containing GPS points.
Install
pip install iris_insee_utils
Usage:
>>>from iris_insee_utils import gps_to_code_iris
>>>gps_to_iris(lat, long, iris_year=2018)
'920200101'
Working with a dataframe with longitude and latitude:
>>> df_gps_to_iris(df, long_col, lat_col, iris_year=2020)
Lieu longitude latitude IRIS CODE_IRIS NOM_IRIS
0 Mairie de Marseille 5.369 43.296 0301 132020301 Quai du Port
1 Site-Mémorial du Camp des Milles 5.382 43.503 0905 130010905 Les Milles Village
Plot a map with data that enriches the IRIS level:
plot_folium_map(
2020,
"Paris",
df_enrich=df_enrich,
df_enrich_iriscol_colname="IRIS",
df_enrich_select_cols=["Nombre de ménges","Nombre de personnes"]
)
plot_folium_map(2018, "Limoges", df_oi=df_bus_stops)
More information about IRIS: https://www.insee.fr/fr/information/5008701?sommaire=5008710#titre-bloc-32
Related project: https://github.com/Oslandia/pyris
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file iris_insee_utils-0.1.1.tar.gz.
File metadata
- Download URL: iris_insee_utils-0.1.1.tar.gz
- Upload date:
- Size: 20.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.4.29
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0dd1f95f41b752c1562bb60a4652ce1366247b1651fe8f3c03fa2910a98fc51e
|
|
| MD5 |
780d93a88a1f365488c35b2f4ea5a6f1
|
|
| BLAKE2b-256 |
58bf01e7be5d054880aa413ff0f17b49cee3690c0248640719888059f6624ad5
|
File details
Details for the file iris_insee_utils-0.1.1-py3-none-any.whl.
File metadata
- Download URL: iris_insee_utils-0.1.1-py3-none-any.whl
- Upload date:
- Size: 20.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.4.29
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fcc9df6c288fbcb79a5e07dce43eea7bb7ab7a02972d485c3680ff0e7d6736f5
|
|
| MD5 |
c46d0f39c5f88f257ae5f2c12d3dd3f5
|
|
| BLAKE2b-256 |
962478c97389986eb29a213c434e655ae034a293012fe903c1ff2b8cca4bd54c
|