h3-toolkit
A Polars-native toolkit for aggregating and visualizing geospatial data using Uber's H3 spatial indexing system.
Documentation: https://h3-toolkit.readthedocs.io/
Installation
pip install h3-toolkit
# With visualization support (pydeck, mapclassify)
pip install h3-toolkit[vis]
Quick Example
import geopandas as gpd
from h3_toolkit import H3Toolkit
from h3_toolkit.aggregation import Mean, Sum
# Load your vector data (e.g., census blocks, building footprints)
gdf = gpd.read_file("your_data.geojson")
result = (
H3Toolkit()
.process_from_vector(gdf, resolution=9)
.set_aggregation_strategy({
"population": Sum(),
"income": Mean(),
})
.get_result()
)
print(result)
# shape: (n, 3)
# ┌─────────────────┬────────────┬────────┐
# │ cell ┆ population ┆ income │
# │ --- ┆ --- ┆ --- │
# │ u64 ┆ f64 ┆ f64 │
# ╞═════════════════╪════════════╪════════╡
# │ 613194865823… ┆ 1204.0 ┆ 52300. │
# └─────────────────┴────────────┴────────┘
Features
- Polars-native — all aggregations run on Polars, no pandas overhead
- Chainable API — compose
process_from_vector,set_aggregation_strategy, andget_resultin a single pipeline - Multiple input formats — vector (GeoDataFrame), raster, or existing H3 cells
- Pluggable aggregation strategies —
Sum,Mean,Count,EqualSplit,Centroid, and more - Optional visualization — built-in pydeck-based map rendering via the
visextra
Contributing
Contributions are welcome! Please read CONTRIBUTING.md before opening a pull request.
License
MIT © City Science Lab @ TaipeiTech, Syuan-Bo Huang
Metadata
Release files for h3-toolkit 0.3.16
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 | Actions |
|---|---|---|---|---|
| h3_toolkit-0.3.16.tar.gz | 20.1 kB | Without provenance | Details for h3_toolkit-0.3.16.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| h3_toolkit-0.3.16-py3-none-any.whl | Python 3 | none | any | Details for h3_toolkit-0.3.16-py3-none-any.whl |
Total release size: 42.2 kB
Release files / h3_toolkit-0.3.16.tar.gz
| Download URL | h3_toolkit-0.3.16.tar.gz |
|---|---|
| Size | 20.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
354af16b29600684983ffa406d1125bd51f555ca3524bc5c0fb8b32a9cd4e680
|
|
BLAKE2b-256 checksum How to use checksums |
794729adf3ae18f1020385b3d789f84893efff38621a7ea3a8eb161309d383ea
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.0.1 CPython/3.12.2 Darwin/25.3.0
|
Release files / h3_toolkit-0.3.16-py3-none-any.whl
| Download URL | h3_toolkit-0.3.16-py3-none-any.whl |
|---|---|
| Size | 22.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
68cc7d5b9e8fead798a1192c836d968abb121792f8b45e58df6a3438722f7805
|
|
BLAKE2b-256 checksum How to use checksums |
e890eb4bed7aa73a7d36fe19427e146f90af96967b2ec1f748e75443a6300f2f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.0.1 CPython/3.12.2 Darwin/25.3.0
|
Security for h3-toolkit 0.3.16
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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.