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 = fbn.fixbikenet("Frederiksberg municipality")
Explore results¶
See the contents of the resulting geodataframe:
gaps.head()
| path | benefit | name | edge_list | source | target | ordering | length | geometry | |
|---|---|---|---|---|---|---|---|---|---|
| 0 | [576734, 982458401, 1602521961, 929287662] | 114509.773337 | n/a | [(576734, 982458401), (982458401, 1602521961),... | 576734 | 929287662 | 0 | 189.228303 | LINESTRING (12.5214 55.67937, 12.52136 55.6792... |
| 1 | [8088739, 369902569] | 65684.000000 | n/a | [(8088739, 369902569)] | 8088739 | 369902569 | 1 | 22.498959 | LINESTRING (12.51731 55.67908, 12.51732 55.679... |
| 2 | [8088739, 271447788] | 51073.000000 | n/a | [(8088739, 271447788)] | 8088739 | 271447788 | 2 | 15.787892 | LINESTRING (12.51731 55.67908, 12.5173 55.679,... |
| 3 | [1629778132, 1629778158, 1631231681, 5771168117] | 42247.092427 | n/a | [(1629778132, 1629778158), (1629778158, 163123... | 1629778132 | 5771168117 | 3 | 153.661596 | LINESTRING (12.53946 55.67056, 12.53931 55.670... |
| 4 | [781056, 1622070812, 1622070808, 1622070849, 5... | 37662.754856 | n/a | [(781056, 1622070812), (1622070808, 1622070812... | 781056 | 13824074631 | 4 | 210.350752 | LINESTRING (12.54403 55.68123, 12.54361 55.681... |
Explore the results interactively:
gaps.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