Inspiration
The NTU Shuttle Bus service does not give us comprehensive information on getting around NTU. We wanted to create an useful API to better provide travel suggestions for NTU students.
What it does
- Input current location [and destination] to find:
- The nearest bus stop
- Time to walk there
- ETA for next bus
- Time for the bus to arrive at destination
- Choose whether least walking distance or least total time is preferred
- Notify user when it is time to alight
How we built it
- Python to build the model and controller for the API, and Flask to serve the application
- Created our own model of the bus stops and its routes
- Parse real time shuttle bus information
- Developed an algorithm to figure out the next bus stop for a certain shuttle bus
- Use Google Maps API for real time distance analysis
Challenges we ran into
- The curve nature of campus bus routes makes it hard to determine the distances, we added several fake bus stops to solve this problem
- When bus stops the speed is 0, it could either be that the bus is off service or simply stoping at a station, we added an unknown state for the certain bus in this situation
- Google Maps API has limited query for a free account, we cached some relative requests during launch time to minimise the request through the API, and used our own modelling when necessary for better running efficiency
- Assumed that the two campus bus will not overtake the other, further modelling is required to solve this problem
Accomplishments that we're proud of
- Model our own shuttle bus route and stop
- Efficient response time for ETA queries
- Integrated walking time to help user better decide their travel plan
What we learned
- Flask for backend development
- Local data processing can eliminate network bottleneck
- MVC paradigm
- Effective collaboration using Git and GitHub
What's next for NTU ShuttleBus API
- Better algorithm for calculating and smoothing the speed for more accurate time
- Better judges for speed == 0: Can increase waiting time by the factor of data refresh rate, and when waiting time reached a threshold, the bus is considered off service
- Provide guide to getting out of NTU, (i.e. taking shuttle bus or public bus services)
- Provide navigation inside campus
- Provide a user interface: Graphical or Smart Assistant based
Log in or sign up for Devpost to join the conversation.