Be the fastest with iGO!
iGO is a telegram bot that allows you to reach a desired destination in the city of Barcelona in the fastest way possible by car. It does so by calculating a time parameter that considers lenght, maximum speed avaliable during the trip and real time traffic congestion for each street in the city. Yes, we know, quite cool 😎
First of all make sure you fit the specified requirements mentioned in the requirements.txt file. For additional help with installation there are some references at the end of the README, you might want to check them out.
Once the requirements are fullfilled you can download the archives containing the code:
- i_go.py file for the code of the iGO module.
- bot.py file for the code of the iGO telegram bot.
NOTE: other files contained in the folder are images for the README document or your own files that the program generates to work.
To use the bot, first of all open your telegram account and add the bot to your chats, you can do so by clicking the following link:
Let's activate the bot, you can execute bot.py in the terminal using python3:
python3 bot.pyNOTE: if a message pops up saying that the bot is already on it's because the bot is running through another computer, do not worry you can use it anyways! Sadly we currently don't have the means to keep the bot running 24/7 but it doesn't need a huge amount of resources so you can do it with no worries.
NOTE:if you are the first user executing the code you might need to wait a few seconds or even a minute if your computer is slower to let the bot get and arrange the data.
NOTE: every 5 minutes traffic congestion data is updated, if you request a route but global data is old you might need to wait around a minute again 😄.
Now you can start chatting with the bot, type /start in the chat and the bot will present itself and offer you some help on usage in case you need it. To enable route generation you might want to share your location with the bot so it knows where you are, you can do so with the share location feature that the telegram app has.
CURRENT BASE BOT FEATURES:
- /start -> initiates the conversation
- /help -> gets help
- /author -> gets the names of the authors of the bot
- /go -> shows a map image with the fastest route from your location to the indicated destination
- /where -> shows a picture of your current location (the one you shared, this version does not have a 'real time GPS implemented')
Wonderful! 🌠 let's see a real example.
Easy, isn't it? you are ready to go! 🚙
LATEST UPDATE❗ NEW TRAFFIC FEATURE!
- /traffic -> shows a map image with the current traffic situation using color references indicated by a posterior message.
- Previous to Osmnx:
In Ubuntu, previosly type
sudo apt install libspatialindex-dev. In Mac, typebrew install spatialindex gdaland get the latest versions of the installators.
pip3 install --upgrade pip setuptools wheelpip3 install --upgrade osmnxpip3 install --upgrade staticmap
The program has been developed using the python language. We have used some libraries in order to accomplish the needed tasks.
First of all we developed the igo.py module which is used by the bot and accomplishes 3 main tasks:
- Getting the data
- Formating and grouping the data
- Using the data, module functionalities
Then, we developed the actual bot which let's the user access module functionalities in a very interactive and comfortable way through the telegram chat.
To get a deeper insight of our thought process and how the code works check the documentation of both i_go.py and bot.py 😄
Working on iGo was very interesting as it was our first time managing a team project of this magnitude, we tried our best to make a sensible implementation.
developed by Pol Puigdemont and Jan Sallent, Data Science and Engineering students at UPC, 2021

