https://github.com/callumscoby/networkh3
A package to return clipped H3 hexagons from the extent of an OSMnx network.
https://github.com/callumscoby/networkh3
h3 osmnx routing spatial-analysis
Last synced: 10 days ago
JSON representation
A package to return clipped H3 hexagons from the extent of an OSMnx network.
- Host: GitHub
- URL: https://github.com/callumscoby/networkh3
- Owner: callumscoby
- Created: 2023-08-28T04:22:33.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-08-30T19:18:52.000Z (over 2 years ago)
- Last Synced: 2025-09-24T22:40:33.962Z (4 months ago)
- Topics: h3, osmnx, routing, spatial-analysis
- Language: Jupyter Notebook
- Homepage: https://pypi.org/project/networkh3/
- Size: 28.1 MB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
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, Beijing, Washington DC
Example workflows are available here
## Install
Install the latest version from PyPI:
```sh
pip install networkh3
```
## Import
```sh
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:
```sh
from networkh3 import NETWORKH3
NETWORKH3.get_h3('Leeds, United Kingdom', 'drive', 9)
```
Optional style keywords can also be specified:
```sh
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:
```sh
# Calling the network
NETWORKH3.network
# Calling the clipped H3 hexagons
NETWORKH3.h3
```
## Issues and support
Contribute or log issues here
## Contact
* Website: callumscoby.com
* Twitter: [@ScobyCallum](https://twitter.com/ScobyCallum)
* LinkedIn: [@callumscoby](https://linkedin.com/in/callumscoby)
## Acknowledgements
*
⌇ OSMnx
*
🗺 H3