A main task for bike rental companies is to make sure that the bikes are always where they are needed. However, people often go the same ways at the same time, which is why the bikes at certain times have to moved back from one rental station to another to guarantee the needed distribution of the bikes.
As a first step in helping Sprottenflotte, the sponsored bike rental from the Kiel Region, the bike rentals at the different stations shall be visualized in a way to easily detect which station need additional bikes, which stations have too many bike, and where these stations are located.
- first we played around with the nextbike API
- we started our first asp.net project with .netcore 3.1 and blazor
- setting up a custom OSRM server in docker
- we had a little trouble with the OSRM wrapper for .NET, so we used the OSRM REST API
- we integrated leaflet.js into our blazor view and made use of its JS interop
- frontend!! :)
- osrmnet (wrapper to call c++ OSRM library from C#)
Features in our Demo Version
- show simulated routes (bike-routed) from start to stop of bike rentals
- optionally visualize flow between pairs of stations ("arrows")
- select time period to be shown
- optionally show only rides taking place at a specific point in time
- highlight single station
- consume public nextbike api to record current bike positions and estimate rental routes later
Open Questions / Features
Our very next step
- is to think of a way to deploy the application to be accessible for experimental usage by the Sprottenflotte team.
- clean up code and architecture
- web app could be leaner (e.g. outsource route caching)
- hosting: the API-crawler should run permanently and fetch live data to be processed later (could be a lambda function streaming the response to S3)
- the routing server needs to either be hosted as well or replaced by some public API calls
- the web app itself could be hosted on heroku etc
- move from xml to a better persistance format/db
- MapBox for better performance and customized map style
Features / Ideas
- improve UI
- highlight/select single routes to get more info (duration, time, bike nr?)
- more filters needed for the view (esp. time selection)
- histogram of requests over the day/period
- "play" mode that scrolls through the selected period of time and animates the routes
- visualizing how many bikes were at each station over time and for fixed points in time
- how long and often have which stations been (nearly) empty?
- multimodal navigation feature (address to address by foot optionally using bike stations)
- lending durations compared to estimated direct travel time
- classification of direct transfer vs. A->B->C vs. A->B->A
- which effects does the 30min free offer have?
- application to other regions than Kiel (basically our API call works for any Nextbike region)