Skip to content

Telegram® bot that provides useful information about Bicing® stations and their respective status in a user-friendly interface.

License

Notifications You must be signed in to change notification settings

Vinomo4/Bicing-Bot

Repository files navigation

Bicing® Bot

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.

Instructions

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.

/start

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.

/help

This will trigger a short list of every available command, as well as a brief description of each one of them.

/authors

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.

/graph ⟨distance⟩

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.

/nodes

Writes the number of nodes in the graph.

/edges

Writes the number of edges in the graph.

/components

Writes the number of connected components in the graph.

/plotgraph

Shows a map of the city of Barcelona with the stations and edges in the graph.

/route origin, destination

Given an origin address and a destination address, will print a map of the fastest path from origin to destination with the structure originstation[...]stationdestination.

Note: This is followed by an estimated time of the trip.

/distribute required_bikes required_docks

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.

Architecture

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

Installation

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.

Sources

Team

This bot was developed by:

Vinomo4 CarlOwOs
Víctor Novelle Moriano Carlos Hurtado Comin

Students of Data Science and Engineering at UPC.

License

MIT License

About

Telegram® bot that provides useful information about Bicing® stations and their respective status in a user-friendly interface.

Resources

License

Stars

Watchers

Forks

Languages