Minimum working example¶
This notebook runs a minimum working example with fixbikenet.
Import fixbikenet¶
The standard way of importing fixbikenet:
import fixbikenet as fbn
Run fixbikenet on example city¶
gaps_ordered = fbn.fixbikenet("Frederiksberg municipality")
Explore results¶
See the contents of the resulting geodataframe:
gaps_ordered.head()
| benefit | name | source | target | ordering | length | geometry | |
|---|---|---|---|---|---|---|---|
| 0 | 114509.773337 | n/a | 576734 | 929287662 | 0 | 189 | LINESTRING (12.5214 55.67937, 12.52136 55.6792... |
| 1 | 65684.000000 | n/a | 8088739 | 369902569 | 1 | 22 | LINESTRING (12.51731 55.67908, 12.51732 55.679... |
| 2 | 42247.092427 | n/a | 1629778132 | 5771168117 | 2 | 153 | LINESTRING (12.53946 55.67056, 12.53931 55.670... |
| 3 | 37662.754856 | n/a | 781056 | 13824074631 | 3 | 210 | LINESTRING (12.54403 55.68123, 12.54361 55.681... |
| 4 | 25797.253923 | n/a | 1669421661 | 454565354 | 4 | 74 | LINESTRING (12.50854 55.67991, 12.50933 55.679... |
Explore the results interactively:
gaps_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