SunSandSpace is a Telegram bot that checks the Gijón beaches occupation, making easier to choose the perfect place for maintaining social distancing, one measure suggested[1] to reduce the spread of COVID-19[2]. You can see him in action here.
The project contains these files:
main.py
: File containing almost all the program.img
: Dir with the needed images. They are beaches maps obtained from OpenStreetMap.info.json
: JSON file containing the limit coords for each image in the/img
dir. This is a temp patch to cover some missing info of the official API.
Till the moment, you can't talk to SunSandSpace. A version for the general public hopefully will be available soon. If you're a programmer, you can run it on your personal server (or PC). If you need help, don't doubt contacting me.
A preview of the bot is available at the official page.
You can fork this project. Feel free to contact me if you have any problem.
- python-telegram-bot, wrapper to communicate with the Telegram API.
- The requests module, to stablish the communication with the beach occupation API.
- Matplotlib, to graph the information on the maps.
This bot uses the official API maintained by the Gijón Local Council. You can check the structure of the data here, and get the info here.
- Create a new bot through Telegram @botfather and get the access token. You can see a tutorial here. Remember to keep it private.
- Clone this repository. Make sure
main.py
is located in the same dir whereimg
is located. Or change it on themain.py
file. - Download the dependences. You can use
install -r requirements.txt
to install the libraries listed above. - Replace the var
tm_token
with the access token you obtained in step #1. - Run the code.
This project is under the GNU Affero Public License v3.0 -or later-.
You can mail me if you want to know more information, want to contribute or any other thing.
[1]: Social Distancing: Keep a Safe Distance to Slow the Spread., Centers for Disease Control and Prevention, 2020.
[2]: Coronavirus disease (COVID-19) pandemic, WHO, 2020