Skip to main content

hextraj

Tests PyPI Python License:MIT Docs DOI

Hex labelling of trajectory data.

Hex region OD connectivity
Hex region example OD connectivity example
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 aggregation
  • hex_connectivity — origin-destination matrices
  • hex_connectivity_power — multi-generation transport probabilities
  • hex_connectivity_dask — lazy dask-native connectivity for large datasets
  • Full dask support throughout

Getting started

Explore the notebooks:

Installation

pip install hextraj

For full support, including the optional secondary dependencies:

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".

Metadata

Release files for hextraj 2026.8.21.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hextraj 2026.8.21.5
File Size Uploaded Provenance
hextraj-2026.8.21.5.tar.gz 5.1 MB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for hextraj 2026.8.21.5
File Interpreter ABI Platform
hextraj-2026.8.21.5-py3-none-any.whl Python 3 none any Details

Total release size: 6.4 MB

Release files / hextraj-2026.8.21.5.tar.gz

Download URL hextraj-2026.8.21.5.tar.gz
Size 5.1 MB
Tags Source
SHA-256 checksum
How to use checksums
90be478b60ef2673c379daa4ff6ab1d3ba45eabeca36e0a2a416cfe41538b1d9
BLAKE2b-256 checksum
How to use checksums
84896405ce8f6774453580ca642b14205a7be06ee3b4e7d1ab26544f66b327ca
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 21, 2026.

Transparency log

Release files / hextraj-2026.8.21.5-py3-none-any.whl

Download URL hextraj-2026.8.21.5-py3-none-any.whl
Size 1.4 MB
Tags Python 3
SHA-256 checksum
How to use checksums
c0a2698b59521463b9c7e8b9df07467f82d2099eb8399cd4c0409256910bdd39
BLAKE2b-256 checksum
How to use checksums
b8eaf683456a5a68484097b2aebef065a15b4289a717d94b9dabd84dbbe95dd1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 21, 2026.

Transparency log

Security for hextraj 2026.8.21.5

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.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for hextraj-2026.8.21.5.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 21, 2026.

Transparency log

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page