Skip to main content

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.

logo

image image Binder PyPI version image image

Installation

pip

image

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

vgridpandas-1.0.4.tar.gz (1.2 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vgridpandas-1.0.4-py3-none-any.whl (451.7 kB view details)

Uploaded Python 3

File details

Details for the file vgridpandas-1.0.4.tar.gz.

File metadata

  • Download URL: vgridpandas-1.0.4.tar.gz
  • Upload date:
  • Size: 1.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.12

File hashes

Hashes for vgridpandas-1.0.4.tar.gz
Algorithm Hash digest
SHA256 9ef5e28745498c85351598e2fa18bd5785e4f7897f918b127d7b3f00989bd53f
MD5 21c8bb62475f4a88a2cf11f28443ff5c
BLAKE2b-256 cb0f1403d1e92c923acb9105e95338177c3e9222c7ad20fff7e1b928a82fc736

See more details on using hashes here.

File details

Details for the file vgridpandas-1.0.4-py3-none-any.whl.

File metadata

File hashes

Hashes for vgridpandas-1.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 041a0cdd72d9c81b754360106ae9e073b970fa4ab85dbbbcc772261b2319498b
MD5 e787b07b40751351f02d3ff3859c2bc1
BLAKE2b-256 b071e4048e01f6ff46d61e3fcf2c6647e7031f65461d9e237bb5582ff1a5ab63

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page