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.215686 LINESTRING (4.85595 45.7328, 4.85594 45.73276,... 959373357 11942296886 0 2036 2036
1 0.117647 LINESTRING (4.83139 45.76126, 4.83136 45.7612,... 13533881767 959373357 1 2660 4696
2 0.117647 LINESTRING (4.85383 45.76229, 4.8527 45.76219,... 959373357 2139361034 2 1960 6657
3 0.111111 LINESTRING (4.84111 45.76129, 4.84113 45.76141... 959373357 11571529610 3 2548 9205
4 0.098039 LINESTRING (4.80882 45.79182, 4.80878 45.79176... 2139361034 25303800 4 4411 13617

Explore the results interactively:

edges_ordered.explore(
    tiles="CartoDB Positron", # background map
    style_kwds={"weight": 3, "color": "#096a51"}, # thick green lines
)
Make this Notebook Trusted to load map: File -> Trust Notebook

See the Usage docs for detailed explanations.