Sismos Perú Bot

This Twitter Bot (@SismosPeruBot) is not a commercial business intent. I am learning to code and just getting started with Twitter API. In that sense my intent is to learn the API.

My initial project is to create a bot that filters official public Tweets from the Geological and emergency services from Perú (@Sismos_Peru_IGP, @DHN_peru, @COENPeru). My family lives in Peru and I follow those services but they send too many alerts that are not relevant to me. Those services by law send tweets about earthquakes magnitude 4.0 and higher and Tsunami alerts even in a Tsunami is not expected. I want to stream their accounts and only Retweet using the bot if the earthquake magnitude is 6.1 or bigger, and/or only if Tsunami is expected. That will make easier to follow the notifications from the bot, reducing the number of notifications to only major events if you are following the bot, but keeping the sources of the information to the official Peruvian emergency channels.

Twitter analysis:

I will read the public Tweets of @Sismos_Peru_IGP and search for earthquake magnitude in the text. If earthquake magnitude is equal or bigger than 6.1 I will Retweet. I will read the public tweets of @DHN_peru and search for the words “Tsunami is expected” (in Spanish). If a Tsunami is expected I will Retweet.

Future analysis: I will record the public tweets from @Sismos_Peru_IGP to read location and magnitude of earthquakes with magnitude 4.0 or bigger and save that information to be added as dots to a map of Peru that will be displayed as a jpg file and periodically shared in a Tweet by the bot.

Future analysis: I will run a few weeks of earthquake geographical information and try to cluster the earthquakes by region, displaying the clusters on top of a map of Peru, as a jpg or as an animation GIF, and share it in a tweet by the bot.

User interaction (Retweet and Tweet):

I will Retweet @Sismos_Peru_IGP if they announce mayor earthquakes (magnitude >= 6.1) and I will Retweet @DHN_peru if they announce a Tsunami in Peruvian coastal areas. I will Tweet jpg and/or GIF showing a map of Peru with dots showing location of earthquakes.

I hope this is useful.

Made by Ivan F. Gonzalez (@ivan_phd)

Comments are closed.