Inspiration

When we are trying to get to a bus based on the usual bus app timing, we do it based on gut instinct. Therefore, we think that a telegram bot that determines whether you can make it and the pace you need based on your own pace to get to the bus stop to be very useful.

What it does

Walksomemore is a telegram bot that determines your pace and helps you show whether you can make it for a bus. By using Google API and a database, users can calibrate their own personal pace. Given this pace, users can then check their distance from any bus stop and whether they can make it on time for their bus. If they can reach the bus but they need to increase their pace, the telegram bot will output a song with a corresponding tempo to help the user get to the bus stop on time.

How we built it

This Telegram Bot is built using the pyTelegramBotAPI library (www.github.com/eternnoir/pyTelegramBotAPI). It is hosted on Replit and uses MongoDB database. To get the bus timings and location of the bus stops, the telegram bot sends a get request to the LTA (Land Transport Authority) Datamall API. The distance between any 2 points is then calculated by sending a get request to the Google Maps Distance Matrix API.

Challenges we ran into

  1. Inaccuracies of calculating distance between 2 points based on latitude and longitude
  2. The need for users to wait for GPS to update their location before sharing their location

Accomplishments that we're proud of

  1. Overcoming the limitation of the 500 data records for any request from the LTA server
  2. Posting user data to MongoDB database and retrieving data whenever necessary
  3. Circumventing various limitations of using the telebot library which includes:
    1. a lack of methods or commands that instructs the bot to only react to specific input from users
    2. accessibility of user location: which can only be done if the user chooses to share his / her location
  4. Accounting for most of the user cases

What we learned

Definitely, we definitely had great fun building a telegram bot. We learnt new APIs, such as telegram API and Google map API, and used new tech stacks and we learnt how to create a database. We also learnt how to make the telegram bot interactive and store user-provided data properly. Specifically, learning how to use MongoDB API was a new challenge for us. At the same time, we learnt to be more precise in debugging code. However, beyond the technical skills, we learnt to be better at working as a team. Truly, teamwork makes the dream work. At times, we had to go above and beyond and help each other out, and we learnt how to work under time pressure. Through these experiences, we definitely forged stronger bonds.

What's next for WalkSomeMore

New Features

  • [] Support the use of live sharing location from Telegram so that we can reflect the changes in pace needed when user stops walking, e.g. in situations like waiting to cross the road
  • [] Implement a bus arrival timing updater to it accounts for bus delays/early arrival, so that we can adjust recommended pace for user in real time
  • [] Support multiple users to use the Walk Some More Bot simultaneously
  • [] Implement providing a screenshot of the walking path from user's current location to the bus stop
  • [] Show user nearby bus stops based on their current location with bus stop code
  • [] Integrate Current Rain Areas information from Weather.gov.sg to estimate delay in user walking pace and traffic, as well as suggesting indoor walking paths whenever possible
  • [] Implement LTA DataMall API to show how full each bus is
  • [] Implement a favourites section for users to store bus stop codes that they use frequently
  • [] Implement a last bus function that informs user to run for the bus at all cost
  • [] Implement simple games within Telegram for user to play when they arrive the bus stop early and after they board the bus
  • [] Implement a feedback system which prompts user to give feedback on whether they managed to catch the bus in time, if yes, we will maintain the pace given to the user, else, we will provide them with reasons to choose from, such as red light, pace given was not fast enough, and adjust the database to provide a faster pace to this particular user in the future as they might not have followed their calibrated walking speed
  • [] Automate the process of calibration such that they just have to type /start and the bot will take care of the rest

User Experience

  • [] Implement a metronome with background music that adjusts to plays sounds according to the pace required to reach bus stop on time, to replace the links to songs
  • [] Create a larger library of songs/sounds used as the guide for the pace to let users have a choice between songs with the same bpm
  • [] Find a suitable platform to host songs under creative commons license so that our users can play the songs ad-free for non-premium users for spotify and youtube
  • [] Collaborate with National Steps Challenge to encourage people to walk more and use our bot to aid them, rather than taking private hire cars
  • [] Create a theme like Bus Uncle and personify the messages sent to the user for better user experience
  • [] Implement pedometer and calories counter to gamify the experience

Accuracy

  • [] Support the use of the user's accelerometer and pedometer so that we can get a more accurate and precise data of the user's actual pace for calibration and to get the user's current walking, which will provide a more personalised experience for the user
  • [] Implement Geolocation API from Google Maps Platform to get a more accurate and precise location of the user

Built With

Share this project:

Updates