Skip to main content

Hierarchical hexagonal geospatial indexing system

Project description

H3 Logo

h3-py: Uber's H3 Hexagonal Hierarchical Geospatial Indexing System in Python

PyPI version PyPI downloads conda version version

Tests codecov

Python bindings for the H3 core library.

Installation

From PyPI:

pip install h3

From conda:

conda config --add channels conda-forge
conda install h3-py

Usage

>>> import h3
>>> lat, lng = 37.769377, -122.388903
>>> resolution = 9
>>> h3.geo_to_h3(lat, lng, resolution)
'89283082e73ffff'

APIs

We provide multiple APIs in h3-py.

Example gallery

Browse a collection of example notebooks, and if you have examples or visualizations of your own, please feel free to contribute!

We also have an introductory walkthrough of the API.

Versioning

h3-py wraps the H3 core library, which is written in C. The C and Python projects each employ semantic versioning, where versions take the form X.Y.Z.

The h3-py version string is guaranteed to match the C library string in both major and minor numbers (X.Y), but may differ on the patch (Z) number. This convention provides users with information on breaking changes and feature additions, while providing downstream bindings (like this one!) with the versioning freedom to fix bugs.

Use h3.versions() to see the version numbers for both h3-py and the C library. For example,

>>> import h3
>>> h3.versions()
{'c': '3.6.3', 'python': '3.6.1'}

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

h3-3.7.6.tar.gz (178.6 kB view hashes)

Uploaded source

Built Distributions

h3-3.7.6-cp311-cp311-win_amd64.whl (844.2 kB view hashes)

Uploaded cp311

h3-3.7.6-cp311-cp311-macosx_11_0_arm64.whl (894.1 kB view hashes)

Uploaded cp311

h3-3.7.6-cp311-cp311-macosx_10_9_x86_64.whl (945.1 kB view hashes)

Uploaded cp311

h3-3.7.6-cp310-cp310-win_amd64.whl (848.6 kB view hashes)

Uploaded cp310

h3-3.7.6-cp310-cp310-macosx_11_0_arm64.whl (905.0 kB view hashes)

Uploaded cp310

h3-3.7.6-cp310-cp310-macosx_10_9_x86_64.whl (954.5 kB view hashes)

Uploaded cp310

h3-3.7.6-cp39-cp39-win_amd64.whl (855.6 kB view hashes)

Uploaded cp39

h3-3.7.6-cp39-cp39-macosx_11_0_arm64.whl (902.4 kB view hashes)

Uploaded cp39

h3-3.7.6-cp39-cp39-macosx_10_9_x86_64.whl (953.4 kB view hashes)

Uploaded cp39

h3-3.7.6-cp38-cp38-win_amd64.whl (855.4 kB view hashes)

Uploaded cp38

h3-3.7.6-cp38-cp38-macosx_11_0_arm64.whl (892.7 kB view hashes)

Uploaded cp38

h3-3.7.6-cp38-cp38-macosx_10_9_x86_64.whl (943.4 kB view hashes)

Uploaded cp38

h3-3.7.6-cp37-cp37m-win_amd64.whl (850.4 kB view hashes)

Uploaded cp37

h3-3.7.6-cp37-cp37m-macosx_10_9_x86_64.whl (945.0 kB view hashes)

Uploaded cp37

h3-3.7.6-cp36-cp36m-win_amd64.whl (850.2 kB view hashes)

Uploaded cp36

h3-3.7.6-cp36-cp36m-macosx_10_9_x86_64.whl (944.3 kB view hashes)

Uploaded cp36

h3-3.7.6-cp27-cp27m-macosx_10_9_x86_64.whl (957.5 kB view hashes)

Uploaded cp27

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page