Inspiration
We were inspired to make this Twitter Bot because everyone is always on social media and there is a lot of misinformation on the internet regarding COVID-19. If our bot posts just the facts and nothing but the facts, we will be happy that there is at least some non-biased information regarding the virus and then people can formulate their own opinion based on our facts.
What it does
The first function of our Twitter Bot is that it tweets out the total confirmed cases, deaths, and recovered in the world, every day at the same time. The second function is that it automatically replies to any tweet that tags our account and asks the number of cases in a certain country. They can do it by tweeting "@covidBot13 STATUS ". It even works for countries that have multiple spaces.
How I built it
We built it using Python 3 on a code editor called Atom. We used the Twitter API (tweepy). We also used the COVID-19 API which had all the data regarding cases in certain countries and total cases, deaths, etc.. We also had to import json in order to easily use the Covid API. In addition to json, we imported datetime and tweepy.streaming in order to do a daily tweet and stream real-time data so our program can reply to incoming tweets, respectively.
Challenges I ran into
We ran into plenty of challenges while completing this project. It ran smoothly until we had to start implementing the server-side of our project so the bot can run with our computers turned off. Then we had difficulties figuring out how to get the bot to post every 24 hours. We overcame it by just importing time and then we implemented a time.sleep function which repeats our generate tweet function every 24 hours. Then we had a problem with getting the program reply to incoming tweets. It would only reply to past tweets. We overcame this challenge by implementing and importing tweepy.streaming. These were our two major challenges during our project. While these two challenges may not seem that much, these were very frustrating to overcome and we had to try many different things before we finally figured out the correct approach.
Accomplishments that I'm proud of
The biggest accomplishment that we are proud of is the fact that our code posted something on Twitter. This is our first time making a Twitter Bot so weren't even sure that we would figure out how to post. But we figured that out pretty quickly. Another one of our accomplishments is when we overcame all of our challenges and got the Twitter Bot working completely. The feeling when we finished was amazing.
What I learned
We learned how to use different APIs in this project. This is the first time we did a project on this scale, so we had to learn how to use APIs on the fly.
What's next for CovidBot
We have a lot planned for CovidBot. In addition to just tweeting out total cases, deaths, and recovered, we can show the daily increase/decrease in total covid cases, deaths, etc.. We also plan on tweeting out pictures of graphs within our daily tweets. Our reply system is also planned to receive big additions. Among those additions, we plan on adding DEATHS, RECOVERED which will show the number of deaths and recovered, respectively for a certain country. We also plan on adding a DAILY function which will show the cases, deaths, and recovered from a certain country on that day.



Log in or sign up for Devpost to join the conversation.