networkh3
A package to return clipped H3 hexagons from the extent of an OSMnx network. Useful for anyone looking to use the H3 spatial indexing system in route analyses or spatial analyses, and for saving time sourcing H3 hexagons.
Examples
(L-R): London, Washington DC
Example workflows are available in the Github repository.
Install
Install the latest version from PyPI:
pip install networkh3
Import
from networkh3 import NETWORKH3
Usage
NETWORKH3 requires three parameters: the area of interest, the type of OSMNx network, and the resolution of the returned H3 hexagons:
from networkh3 import NETWORKH3
NETWORKH3.get_h3('Leeds, United Kingdom', 'drive', 9)
Optional style keywords can also be specified:
from networkh3 import NETWORKH3
import contextily as cx
NETWORKH3.get_h3('Leeds, United Kingdom', 'drive', 9,
network_kwargs={
'node_size': 1,
'node_color': 'black',
'edge_color': 'red',
'edge_linewidth': 0.2},
h3_kwargs={
'facecolor': 'white',
'alpha': 0.6},
basemap_kwargs={
'source': cx.providers.Stamen.TonerLite}
)
The network and clipped H3 hexagons can then be used in analysis:
# Calling the network
NETWORKH3.network
# Calling the clipped H3 hexagons
NETWORKH3.h3
Issues and support
See the Github repository to report an issue or contribute to this project.
Contact
- Website: callumscoby.com
- Twitter: @ScobyCallum
- Github: @callumscoby
- LinkedIn: @callumscoby
Acknowledgements
Metadata
Release files for networkh3 0.0.5
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 |
|---|---|---|---|---|
| networkh3-0.0.5.tar.gz | 4.2 kB | Without provenance | Details for networkh3-0.0.5.tar.gz |
Release files / networkh3-0.0.5.tar.gz
| Download URL | networkh3-0.0.5.tar.gz |
|---|---|
| Size | 4.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e3e3bc4d0e635f67da198fb9e6e87880662e60605644d6bfc55d50c38d719fe9
|
|
BLAKE2b-256 checksum How to use checksums |
b1fad0226cc0821097c56e2e16d43f08c6a53b71d910861535059cd69c481262
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.9
|
Security for networkh3 0.0.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.
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.