Author : Emre Okcular
Date Created : January 31st 2021
Date Updated : June 1st 2021
After an extraordinary year, we have already completed 8% of 2021.
Did you ever wonder about the optimism trend about the toughest year 2021 during 2020 ? We all faced with up and down mental mood during 2020. I wonder how to analyze this mood of the people from all over the world.
To answer this question, all the tweets and replies of the twitter bot account Progress Bar 2021 is collected with Twitter API. Tweepy package is used for all the API calls with secret key and tokens.
Progress Bar 2021 divides the year into 100 pieces and tweets 1% progress in every 4 days.
100 tweets that show the progress of 2020 and its replies are analysed.
In the below graph, favorites and retweet counts are visualized for each tweet which represents 1% progress.
It is interesting that July 2020 has one of the highest favorite count.
Secondly, all the replies are retrieved with Twitter API with below criteria:
query = 'to:@ProgressBar202_ lang:en -has:links 2021'
Sample data
reply_to | reply_to_text | full_text | user_location | user_lang | id | date |
---|---|---|---|---|---|---|
1273173039124021251 | 2020 is 46% complete. https://t.co/EF8lf5aLMZ | @ProgressBar202_ guys i have an idea. what if we just all celebrate new years on june 30th and then force the world into 2021 | UTC 0 / GMT | 1273222279007211521 | 2020-06-17 11:53:41 | |
1273173039124021251 | 2020 is 46% complete. https://t.co/EF8lf5aLMZ | @ProgressBar202_ @morvjn Can we not make an exception and bring January 1st 2021 forward a bit? | درب التبانة | 1273213382146088962 | 2020-06-17 11:18:20 | |
1273173039124021251 | 2020 is 46% complete. https://t.co/EF8lf5aLMZ | @ProgressBar202_ @GywerMelanie Just as if 2021 would be any better. You all are so naive. | Wien | 1273205576445689856 | 2020-06-17 10:47:19 | |
1275825770850648066 | 2020 is 48% complete. https://t.co/R4C9LbbS6p | @ProgressBar202_ Bold of y’all to assume that 2021 will be better | 1276031307953385474 | 2020-06-25 05:55:45 | ||
1275825770850648066 | 2020 is 48% complete. https://t.co/R4C9LbbS6p | @ProgressBar202_ Y’all screaming FASTER like 2021 is gonna be better lmao | 1275826456329768961 | 2020-06-24 16:21:45 | ||
1275825770850648066 | 2020 is 48% complete. https://t.co/R4C9LbbS6p | @ProgressBar202_ No point in going faster 2021 will be just as bad. | 1275826316659568642 | 2020-06-24 16:21:12 |
Then compound sentiment scores are calculated for each reply by using VaderSentiment. The compound score is computed by summing the valence scores of each word, and then normalized to be between -1 (most extreme negative) and +1 (most extreme positive).
In the below graph, you can see the average sentiment score of all the replies per 1% progress.
From January to July replies containing 2021 keyword have positive sentiment scores mostly. Between July and November negative replies about 2021 increased significantly. After November it is clear that good wishes about 2021 is increased.
Top 10 most positive replies
Top 10 most negative replies
Below you can see the wordcloud of all the replies. The size of the word represents its frequency.
Finally, it is clear that we always have faith for a better future.
You can check the github repository for the source code.