Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Extreme Bikesharing

Extreme Bikesharing

Extreme Bikesharing: How I used Python to plan an epic Ford GoBike trip - Jonas Neubert

How do you get the most bike for the buck out of a $10 day-pass for the Bay Wheels (formerly "Ford GoBike") bike share system? This talk is about how I used constraint programming, mapping and routing APIs, public bike share datasets, map visualization libraries, and a whole lot of Python to plan an epic 13-hour-long 121-leg bike ride around the East Bay.

https://jonasneubert.com/talks/

Jonas Neubert

January 08, 2020
Tweet

More Decks by Jonas Neubert

Other Decks in Technology

Transcript

  1. jonemo
    Jonas Neubert
    Extreme Bikesharing
    How I used Python to plan an epic Ford GoBike trip
    SF Python Meetup, 8 Jan 2020

    View Slide

  2. jonemo

    View Slide

  3. jonemo

    View Slide

  4. jonemo
    switch to Jupyter Notebook
    The primary (technical) content of this presentation was presented
    by stepping through a Jupyter Notebook. You can download a copy
    of the Notebook from this Github repo:
    https://github.com/jonemo/fordgobikesunday/
    The following slides are screenshots of select cells from the
    Jupyter Notebook that are only included in the published version of
    these slides.

    View Slide

  5. jonemo

    View Slide

  6. jonemo

    View Slide

  7. jonemo

    View Slide

  8. jonemo

    View Slide

  9. jonemo

    View Slide

  10. jonemo

    View Slide

  11. jonemo

    View Slide

  12. jonemo

    View Slide

  13. jonemo

    View Slide

  14. jonemo

    View Slide

  15. jonemo

    View Slide

  16. jonemo

    View Slide

  17. jonemo

    View Slide

  18. jonemo

    View Slide

  19. jonemo

    View Slide

  20. jonemo

    View Slide

  21. jonemo
    return from Jupyter Notebook
    After the excursion to the Jupyter Notebook for the main content of
    the presentation, the slides resume here for the trip report.
    You can download a copy of the Notebook from this Github repo:
    https://github.com/jonemo/fordgobikesunday/

    View Slide

  22. jonemo

    View Slide

  23. jonemo
    7
    2
    3
    5
    4
    6.
    1
    8
    9
    10
    11
    12
    13

    View Slide

  24. jonemo

    View Slide

  25. jonemo

    View Slide

  26. jonemo

    View Slide

  27. jonemo

    View Slide

  28. jonemo
    8:53am

    View Slide

  29. jonemo
    10:19am

    View Slide

  30. jonemo
    11:48am

    View Slide

  31. jonemo
    2:28pm

    View Slide

  32. jonemo
    4:18pm

    View Slide

  33. jonemo
    5:26pm

    View Slide

  34. jonemo
    5:59pm
    Telegraph Ave at 58th St

    View Slide

  35. jonemo
    7:41pm

    View Slide

  36. jonemo
    9:47pm

    View Slide

  37. jonemo
    9:58pm

    View Slide

  38. jonemo
    9:58pm

    View Slide

  39. jonemo

    View Slide

  40. jonemo

    View Slide

  41. jonemo

    View Slide

  42. jonemo
    Stats
    Estimated time from start to finish: 12 hrs 48 min
    Actual time from start to finish: 13 hrs 2 min
    Total bicycle rental time: 6 hrs 43 min
    Total time between rentals: 6 hrs 5 min
    Distance: ~90km
    Times Telegraph Avenue crossed: 8
    Times Telegraph Avenue touched: 2
    Stations checked in at: 121
    Stopped at but not checked in: 1
    Stations missed: 2
    -----
    Total number of stations in East Bay: 124

    View Slide

  43. jonemo

    View Slide

  44. jonemo
    April 2018:
    First e-bikes
    deployed
    Dec 2018:
    First e-bikes
    deployed
    April 2019:
    Brake issues
    June 2019:
    2nd Gen e-bikes
    June 2019:
    Battery fires

    View Slide

  45. jonemo

    View Slide

  46. jonemo
    PyPI packages used:
    - folium
    - mapbox see also: https://docs.mapbox.com/
    - ortools see also: https://developers.google.com/optimization/
    - geopy (for distance calculation)
    Folium map export:
    https://jonemo.github.io/fordgobikesunday/
    https://jonemo.github.io/fordgobikesunday/itinerary.html
    #FordGoBikeSunday Twitter thread:
    https://twitter.com/jonemo/status/1010763287527473154
    Got idea for silly bike ride or hike? Email: [email protected]

    View Slide