Telegram® bot that provides useful information about Bicing® stations and their respective status in a user-friendly interface.
This project consists of a Telegram® bot developed in Python which answers either with text or images to questions related to geometric graphs defined over the Bicing® stations in the city of Barcelona.
In order to chat with the bot, one must first install the Telegram® application. Once it is installed, the user must write @BCN_BicingBot
and open a
conversation with the bot. Once this is done, the /start
command will
automatically trigger, allowing the introduction of the following instructions.
Initiates conversation with the bot, which includes the creation of a graph with a distance of 1000m. The meaning of this value will be explained as follows.
This will trigger a short list of every available command, as well as a brief description of each one of them.
Sends a message with the authors of the project, as well as the current version of the bot and the university where it has been developed at.
Given a value which represents the maximum distance (in meters) allowed between stations, it will create a geometric graph with the bike stations as nodes and edges between the stations that are within the introduced distance. This graph will be used from now on by the following commands.
Note: If an invalid distance is given,(<0 or None), 1000 meters will be used.
Writes the number of nodes in the graph.
Writes the number of edges in the graph.
Writes the number of connected components in the graph.
Shows a map of the city of Barcelona with the stations and edges in the graph.
Given an origin address and a destination address, will print a map of the fastest path from origin to destination with the structure origin → station → [...] → station → destination.
Note: This is followed by an estimated time of the trip.
Given a number of required bikes and docks per station, returns (if such request is possible) the cost of doing it, as well as the most expensive transaction of bikes between two stations.
The repository folder contains several files, one being this README. The rest of them are:
requirements.txt
is used for installation.data.py
contains all the code related to the data acquisition, graph construction and calculations over the said graph.- On the other hand,
bot.py
has the code related to the Telegram® functionality of the bot.
Note: The rest of the files in the master branch are auxiliary or license related
In order to have access to the libraries used in this bot the user must write
the line pip install -r requirements.txt
in the command line window while
being inside the project folder.
This bot was developed by:
Víctor Novelle Moriano | Carlos Hurtado Comin |
Students of Data Science and Engineering at UPC.