Minimum working example¶
This notebook runs a minimum working example with growbikenet.
Import growbikenet¶
The standard way of importing growbikenet:
import growbikenet as gbn
Run growbikenet on example city¶
edges_ordered = gbn.growbikenet("Lyon")
Explore results¶
See the contents of the resulting geodataframe:
edges_ordered.head()
| betweenness | geometry | source | target | ordering | length | length_cumulative | |
|---|---|---|---|---|---|---|---|
| 0 | 0.196078 | LINESTRING (4.83139 45.76126, 4.83136 45.7612,... | 13533881767 | 959373357 | 0 | 2367 | 2367 |
| 1 | 0.189542 | LINESTRING (4.83133 45.76115, 4.83129 45.76107... | 11942296886 | 959373357 | 1 | 2645 | 5012 |
| 2 | 0.143791 | LINESTRING (4.83316 45.76029, 4.83319 45.76027... | 11571529610 | 959373357 | 2 | 1772 | 6785 |
| 3 | 0.117647 | LINESTRING (4.87763 45.74758, 4.87758 45.7476,... | 25303800 | 8479085388 | 3 | 2071 | 8856 |
| 4 | 0.111111 | LINESTRING (4.8725 45.75985, 4.87243 45.75981,... | 11571529610 | 8479085388 | 4 | 1837 | 10693 |
Explore the results interactively:
edges_ordered.explore(
tiles="https://tiles.stadiamaps.com/tiles/alidade_smooth/{z}/{x}/{y}{r}.png",
attr="(C) Stadia Maps (C) OpenMapTiles (C) OpenStreetMap contributors",
style_kwds={"weight": 3, "color": "#096a51"},
)
Make this Notebook Trusted to load map: File -> Trust Notebook
See the Usage docs for detailed explanations.