A Twitter bot that automatically posts a daily map of the previous day's earthquakes, providing real-time global seismic activity updates.
LE GOURRIEREC Titouan
Report a bug · Request Feature
Table of Contents
This project is a Twitter bot that posts daily updates on global seismic activity. Using the USGS (United States Geological Survey) API, it fetches earthquake data from the previous day, including the total number of quakes and their distribution by magnitude. The bot then generates a visual map displaying the locations of the earthquakes and posts it on Twitter (X) via the X API.
Features:
- Automatic daily data retrieval from the USGS API.
- Visual map generation of earthquakes worldwide.
- Summary of key statistics: total earthquakes and magnitude distribution.
- Automated posting on X (formerly Twitter) using the X API.
The main functions of the bot, including data retrieval, processing, plotting, and posting to Twitter, are defined in DailyQuakes.py
. The automation logic is handled by bot.py
, while logging configuration is managed by config_logging.py
, with log messages saved to log.txt
in the log
directory. The daily execution of the bot is automated using GitHub Actions, with the workflow defined in .github/workflows/bot.yml
. This setup ensures the bot runs daily without manual intervention, fetching data, generating visualizations, and posting updates seamlessly.
Distributed under the MIT License. See LICENSE
for more information.
LE GOURRIEREC Titouan - titouanlegourrierec@icloud.com
Project Link: https://github.com/titouanlegourrierec/TodayQuakes
- USGS : Earthquakes data