Integration of Vgrid DGGS into Pandas and GeoPandas
Project description
VgridPandas
VgridPands - Integrates Vgrid DGGS with GeoPandas and Pandas, inspired by H3-Pandas
VgridPandas supports a wide range of popular geodesic DGGS including H3, S2, A5, rHEALPix, Open-EAGGR ISEA4T, EASE-DGGS, QTM, as well as graticule-based systems such as OLC, Geohash, MGRS, GEOREF, TileCode, Quadkey, Maidenhead, and GARS.
Installation
pip
pip install vgridpandas --upgrade
Key Features
- Latlong to DGGS: Convert latitude and longitude coordinates into DGGS cell IDs.
- DGGS to geo boundary: Convert DGGS cell IDs into their corresponding geographic boundaries.
- (Multi)Linestring/ (Multi)Polygon to DGGS: Convert (Multi)Linestring/ (Multi)Polygon to DGGS, supporting compact option.
- DGGS point binning: Aggregate points into DGGS cells, supporting common statistics like count, min, max, and category-based groups.
Usage examples
Latlong to DGGS
# Prepare data
>>> import pandas as pd
>>> from vgridpandas import h3pandas
>>> df = pd.DataFrame({'lat': [10, 11], 'lon': [106, 107]})
>>> resolution = 10
>>> df = df.h3.latlon2h3(resolution)
>>> df
| h3 | lat | lon |
|:----------------|------:|------:|
| 8a65a212199ffff | 10 | 106 |
| 8a65b0b68237fff | 11 | 107 |
DGGS to geo boundary
>>> df = df.h3.h32geo()
>>> df
| h3 | lat | lon | geometry |
|:----------------|------:|------:|:----------------|
| 8a65a212199ffff | 10 | 106 | POLYGON ((...)) |
| 8a65b0b68237fff | 11 | 107 | POLYGON ((...)) |
Further examples
For more examples, see the example notebooks.
Vgridpandas Documentation
For a full Vgridpandas API documentation and more usage examples, see the documentation.
Any suggestions and contributions are very welcome!
See issues for more.
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
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 vgridpandas-1.0.2.tar.gz.
File metadata
- Download URL: vgridpandas-1.0.2.tar.gz
- Upload date:
- Size: 1.2 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2e7a0f9e2d673576765a96a0d4462a8c7791f855d87e503262cb181b2f09aba5
|
|
| MD5 |
1897da97a1fa56c60527b33043c30a7c
|
|
| BLAKE2b-256 |
01e95143da18da778cf438b1b7a6818127741dacb1fe6aca18ae3b9b24b961ad
|
File details
Details for the file vgridpandas-1.0.2-py3-none-any.whl.
File metadata
- Download URL: vgridpandas-1.0.2-py3-none-any.whl
- Upload date:
- Size: 444.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
81d02a9f7ce626d82ece884f22e12c6832cfc2bfa354eabc8b12e6820da03e38
|
|
| MD5 |
e36ffbf82bbc7d2615f63ec594cdb6d3
|
|
| BLAKE2b-256 |
1d97c13c6c4565d7a30809f6b8ce653f3e9c9d0349cc1b2ac8149d9e4cbc847f
|