hextraj
Hex labelling of trajectory data.
| Hex region | OD connectivity |
|---|---|
| hex_aggregation.ipynb | hex_conn_dask.ipynb |
Maps lon/lat positions to a projected hexagonal grid and provides tools for aggregation and connectivity analysis.
hex_counts— heat maps and density aggregationhex_connectivity— origin-destination matriceshex_connectivity_power— multi-generation transport probabilitieshex_connectivity_dask— lazy dask-native connectivity for large datasets- Full dask support throughout
Getting started
Explore the notebooks:
hex_conn.ipynb— Label NW Shelf trajectories, compute OD connectivity, visualise choropleth + edge overlay.hex_aggregation.ipynb— Grid construction, choropleth aggregation, and weighted edges.hex_grid_construction.ipynb— Rectangle and region hex grids.hex_analysis.ipynb— Analysis functions (hex_counts,hex_connectivity,hex_connectivity_power).hex_conn_dask.ipynb— Dask-native connectivity for large datasets.
Installation
pip install hextraj
With dask, scipy, and cartopy:
pip install hextraj[full]
Or from source:
pip install git+https://github.com/willirath/hextraj.git@main
Quick example
from hextraj import HexProj
hp = HexProj(lon_origin=-3.0, lat_origin=54.0, hex_size_meters=50_000)
# Label positions → int64 hex IDs
hex_ids = hp.label(lon, lat)
# Build a GeoDataFrame with Polygon geometries
gdf = hp.to_geodataframe(hp.region_of_hexes(region_polygon))
gdf["count"] = counts.reindex(gdf.index).fillna(0)
gdf.plot(column="count", cmap="YlOrRd")
Citing
Cite hextraj through its DOI. 10.5281/zenodo.22040740 is the concept DOI, and it resolves to the most recent release. Zenodo mints a separate DOI for each release, so use that one to pin an exact version.
CITATION.cff holds the same metadata. GitHub renders it as BibTeX or APA under "Cite this repository".
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 hextraj-2026.8.21.2.tar.gz.
File metadata
- Download URL: hextraj-2026.8.21.2.tar.gz
- Upload date:
- Size: 5.0 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ad4a7750edd23f7806298723891d6c49ca01304dd43c948c4f350c5ad5f1bed5
|
|
| MD5 |
3da935af7722a06e40ef200fb8a04be6
|
|
| BLAKE2b-256 |
844a88eab98f3ca0c6055496ced2a1ce3685030b1cf9010d859cd3f9efbc8009
|
Provenance
The following attestation bundles were made for hextraj-2026.8.21.2.tar.gz:
Publisher:
release.yml on willirath/hextraj
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
hextraj-2026.8.21.2.tar.gz -
Subject digest:
ad4a7750edd23f7806298723891d6c49ca01304dd43c948c4f350c5ad5f1bed5 - Sigstore transparency entry: 2544883727
- Sigstore integration time:
-
Permalink:
willirath/hextraj@7c8fe942d438d03758c1d4e30c7d39d9b12d085e -
Branch / Tag:
refs/tags/v2026.08.21.2 - Owner: https://github.com/willirath
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@7c8fe942d438d03758c1d4e30c7d39d9b12d085e -
Trigger Event:
push
-
Statement type:
File details
Details for the file hextraj-2026.8.21.2-py3-none-any.whl.
File metadata
- Download URL: hextraj-2026.8.21.2-py3-none-any.whl
- Upload date:
- Size: 1.4 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
06afe9a46de8d17713aadc230d2665fe1a118d11e889e6b75d8cb9ad46004602
|
|
| MD5 |
7da84f4198939dc06b5c8b924225e2a4
|
|
| BLAKE2b-256 |
68a6581e61ce9f7d40535ccda5843066644842396cf90c24f38ffe0ae175c536
|
Provenance
The following attestation bundles were made for hextraj-2026.8.21.2-py3-none-any.whl:
Publisher:
release.yml on willirath/hextraj
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
hextraj-2026.8.21.2-py3-none-any.whl -
Subject digest:
06afe9a46de8d17713aadc230d2665fe1a118d11e889e6b75d8cb9ad46004602 - Sigstore transparency entry: 2544883791
- Sigstore integration time:
-
Permalink:
willirath/hextraj@7c8fe942d438d03758c1d4e30c7d39d9b12d085e -
Branch / Tag:
refs/tags/v2026.08.21.2 - Owner: https://github.com/willirath
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@7c8fe942d438d03758c1d4e30c7d39d9b12d085e -
Trigger Event:
push
-
Statement type: