1. Project title
- SentiWorld: Understanding Emotions between Countries Based on Tweets
2. Goal and motivation
- Goal: Analyze sentiments between countries
- Motivation: What feelings do foreigners have about our country?
3. Data Collection & Analysis
- We have collected 24,938,193 tweets from November 21st to December 15th, 2015 using the Twitter API and we used English common names of country as search query. For example, we used ‘South Korea’ for ‘Korea, Republic of.’
-
Among 212 countries, we have selected the top 100 popular countries based on population report of 2014 according to the World Bank dataset.
Table: The 100 selected countries
Rank |
ISO Code |
Common Name |
Rank |
ISO Code |
Common Name |
- In order to find out where a tweet comes from, we look into the ["place"]["country_code"] key of the tweet. If it is not specified in the tweet, then we check ["user"]["location"] of the user profile. To identify the country of the user, we used various kind of information about the country and the city. For example the English official name, English common name, native official name, and native common name which come from mledoze/countries on GitHub and GeoNames.
-
We adopted the LabMT 1.0 corpus to analyze the sentiments of tweets, which is published in the ‘Temporal Patterns of Happiness and Information in a Global Social Network: Hedonometrics and Twitter’. The corpus which has 10,222 words is build up by users on Mechanical Turk and 50 independent evaluations are done for each given word which has a score from 1 to 9.
For example:
- havg(laughter) = 8.50
- havg(truck) = 5.48
- havg(terrorist) = 1.30
Among the 24,938,193 collected tweets, we found that only 7,381,051 (29.60%) tweets have a sentiment score greater than 0. The analyses are made from those tweets.
- We adopted Louvain and Infomap algorithms for community detection of directed network with weighted edges.
4. Implementation Tools
- Python to collect and analyze tweets.
- D3.js to visualize sentiments map and network.
- Bootstrap to build web pages.
5. Explanatory notes
-
If we have a tweet which contains something like “I love Korea” which is created by someone in United Kingdom:
- United Kingdom has out-going tweet to Korea.
- Korea has in-coming tweet from United Kingdom.
6. Paper