1. Mood and Weather: Feeling the Heat?
Kunwoo Park1, Seonggyu Lee1, Eunae Kim1, Minjee Park2, Juyong Park3, Meeyoung Cha3
Division of Web Science and Technology1, Department of Computer Science2, Graduate School of Culture Technology3
Korea Advanced Institute of Science and Technology (KAIST)
2013. 12. 12. DISC 2013 1
2. Who are we?
• Korea Advanced Institute of Science and Technology
• Located in Daejeon (not Daegu)
• Natural Science and Engineering oriented
• MIT in Korea
We are here
2013. 12. 12. Mood and Weather: Feeling the Heat? 2
3. Who are we?
• Division of Web Science and Technology
• Understanding and Developing the Web
• human-centered web exploration
• Graduate School of Culture Technology
• Social Computing Lab
• Understanding online social networks and social media from diverse perspectives
2013. 12. 12. Mood and Weather: Feeling the Heat? 3
4. Background
THIS… is
American Idol!!!!
A mixed of
raining and
sunshine.
Just replaced the
wheels on my
2nd car :-)
Back to work!
Holla at ya’ll
later!
2013. 12. 12. Mood and Weather: Feeling the Heat? 4
5. Research Potentials
• We can observe people’s actions and words on a significant scale
[Lazer et al. Science 2009]
• It can function as one giant laboratory
• Potentials of social media
• reading people’s mind and thinking
ex> predicting election [Tumasjan et al. ICWSM 2010]
• understanding how social mechanism works
ex> how social convention emerges [Kooti et al. ICWSM 2013]
2013. 12. 12. Mood and Weather: Feeling the Heat? 5
6. Theory on
Social Science
Understanding
human
behaviors and
social networks
Data-Driven
Computational Social Science
Big data
generated
by human
2013. 12. 12. Mood and Weather: Feeling the Heat? 6
7. How to get data??
• Most of services provide ways to get data
• Can use enormous size of data by writing a programming code
• Help computer scientist start to work on computational social science
2013. 12. 12. Mood and Weather: Feeling the Heat? 7
9. Previous works: weather and mood
• Correlation of weather and mood
[Howarth and Hoffman 1984; Preti 1998]
• There are individual differences in how weather affects mood
[Klimsta et al. 2011]
• Some of us cannot stand rain
• When we feel happy with sunny weather, others are not happy
source: http://iconpng.com
http://iconarchive.com
2013. 12. 12. Mood and Weather: Feeling the Heat? 9
10. Limitations on existing works
• Using small number of samples
• Analysis limited to specific regions
• Relying on questionnaire surveys or interviews
Involving sampling biases and
hard to capture differences by region
2013. 12. 12. Mood and Weather: Feeling the Heat? 10
11. 2013. 12. 12. Mood and Weather: Feeling the Heat? 11
12. Previous works using Twitter
• How weather affects changes in tweeting rates [Kiciman, ICWSM 2012]
• Mood is indeed affected by weather [Hannak et al. ICWSM 2012]
• Limited to twenty metropolitan areas
source: http://goo.gl/ZksQ4d source: http://goo.gl/gn6ENM
2013. 12. 12. Mood and Weather: Feeling the Heat? 12
13. Twitter dataset
• Period: April, 2009
• Entire tweets of U.S.
• Location of users
• Size
• 38.1 million tweets
• 3 million users
2013. 12. 12. Mood and Weather: Feeling the Heat? 13
14. Twitter crawling
• Crawling (or called “spidering”) using Twitter API
• Twitter provides API (Application Programming Interface)
• anyone in Twitter can use
• it indicates all of you can gather Twitter data
2013. 12. 12. Mood and Weather: Feeling the Heat? 14
15. Make a program gathering data
from twitter import *
user = ”disc2013"
twitter = Twitter()
results = twitter.statuses.user_timeline(screen_name = user)
for status in results:
print "(%s) %s" % (status["created_at"], status["text"])
With a very few line of codes,
you can get Twitter data for your research!
2013. 12. 12. Mood and Weather: Feeling the Heat? 15
16. Sentiment Analysis
• Sentiment analysis (or opinion mining) aims to determine the attitude of a
speaker or a writer with respect to some topic or the overall contextual
polarity of a document
(source: Wikipedia)
• Categories
• measuring polarity
• ex> I am very happy to attend DISC 2013 !!!! positive
• measuring polarity scale of sentiment across different sentiment dimensions
• ex> I am very happy to attend DISC 2013 !!!! positive: 4, negative: 0
• in this task, we utilized this way
2013. 12. 12. Mood and Weather: Feeling the Heat? 16
17. Sentiment analysis using LIWC
• LIWC (Linguistic Inquiry and Word Count)
• http://www.liwc.net
• 32 behavioral and psychological dimensions
• We can conduct sentiment analysis using 2 of them (positive / negative)
• Method
• Input: aggregated tweet written in a state of a day
• Output: value of positive and negative affect
Positive score: 4.59
Negative score: 2.23
2013. 12. 12. Mood and Weather: Feeling the Heat? 17
18. Example: sentiment analysis of 4/1 in NY
NY_1.txt
NY_1.xls
Filename … humans affect posemo negemo ..
NY_1.txt … 0.7 6.77 4.59 2.23 …
2013. 12. 12. Mood and Weather: Feeling the Heat? 18
19. Weather dataset
• Period: April, 2009
• Source: http://www.wunderground.com
• Using web crawling
• Gathering weather information of each day across states
2013. 12. 12. Mood and Weather: Feeling the Heat? 19
20. Web crawling
• Read HTML codes and pick information that we want
2013. 12. 12. Mood and Weather: Feeling the Heat? 20
21. See the relationship
• Correlations between sentiment and weather variables
Twitter sentiments Weather variables
2013. 12. 12. Mood and Weather: Feeling the Heat? 21
22. Correlation of temperature and positive affects
• Generally, there is correlation between positive affect and temperature across states
(average of r =0.14)
• Some states are showing negative correlations
2013. 12. 12. Mood and Weather: Feeling the Heat? 22
23. Correlation of temperature and positive affects
There is positive correlation between temperature and positive affects
But, it depends on where they live
• Generally, there is correlation between positive affect and temperature across states
(average of r =0.14)
• Some states are showing negative correlations
2013. 12. 12. Mood and Weather: Feeling the Heat? 23
24. Conclusion
• Used social media data to compare w/ environmental data
- Wunderground.com vs. Twitter.com
• Identified notable relationship between the mood and weather
• how weather affects mood varies across region
• The notion of ‘good’ weather can be different against each state
• Arizonans preferred humid days and Hawaiians preferred low atmospheric pressures
• Future works
• Understanding cultural and economic factors by examining wide geographical regions
2013. 12. 12. Mood and Weather: Feeling the Heat? 24
25. Kunwoo Park
M.S. candidate
Social Computing Lab
E-mail: kw.park at kaist.ac.kr
Twitter: @words_life
This work was presented as a poster
in the International AAAI Conference
on Weblogs and Social Media (ICWSM), 2013
in Boston, US.
2013. 12. 12. Mood and Weather: Feeling the Heat? 25
Notes de l'éditeur
Hello, everyone.
I’m happy to get an opportunity to present my work in this great conference.
My work’s title is Mood and Weather: feeling the heat?
and, I am Kunwoo Park from KAIST, south korea.
Probably some of you from other country are not familiar with my university, so let me start with simple introduction of my university and department.
Who are we?
I’m
Okay. Let me start the real talk with background.
There is no doubt that social media become famous, and numerous people are enjoying that.
Over billions of people use online social media
People post their daily lives and feelings globally
In social media, we can observe people’s actions and words on a significant scale.
Big data generated by human helps to understand human behaviors and social networks by using theory on social science.
Then, how to get those valuable data?
Those things show background of this kind of work.
In sum, social media help to see real world through online data.
Let’s get back to the real world.
How do you feel in sunny days?
How about in rainy days?
Pause
Usually, people feel more happier in sunny days,
and feel more sad feelings in rainy days.
Efforts to understand the relationship between weather and mood have been done for decades ago in social sciences, especially psychology.
Some researchers successfully found that weather is correlated with mood from individual scale.
Beyond theses finding, more recent work found there exist individual differences in how weather affects mood.
That is, it was found that each people can feel weather differently.
Even though they show clear relationship, existing works on weather and mood has limitations.
To overcome this limitation, we utilize Twitter data.
How do people express their sentiments on Twitter?
The relationship between weather and mood in Twitter has been rarely studied.
One study aims to see how weather affects changes in tweeting rates.
In other words, they show which kind of weather makes people writes more tweets.
Another work firstly attempt to see relationship between weather and mood pm Twotter.
However, their analysis is limited to twenty metropolitan areas.
Therefore, in this work, we aim to investigate the relationship between weather and mood in Twitter.
To know the relationship between mood and weather, we first gathered Twitter data.
The dataset cover one month of Twitter, April 2009, composed of 38 million tweets written by 3 million users.
It include entire tweets of United States, and we could get location information of each user.
To gather Twitter data, we used the way called “crawling”
Crawling is a technical term indicating the process of gathering data.
As Twitter provides API, anyone in Twitter can use.
It indicates all of you can gather Twitter data four your research
Here is a sample code to get Twitter data.
After that, we analyze sentiment contained in tweets by using sentiment analysis.
We analyze sentiment of tweets by prevalently used tool, LIWC.
Let us see this example to know how the sentiment analysis works.
Not only Twitter dataset, we also crawled weather dataset from a famous web site for providing weather information, wunderground.com.
They provide lots of weather variables, such as temperature, humidity, atmospheric pressure, and so on.
It also covers April, 2009. In Unitied States, there are multiple weather station in a state.
Therefore, we averaged multiple weather stations’ information as one per state.
Web crawling is a way to gather data without API.
Now we have two data, Twitter sentiments of each day across states, and Weather variables.
Result in previous slide shows that people shows different patterns of sentiments across region.
However, it does not show exact relationship between positive affect and temperature.
Therefore, we investigate correlation of positive affect and temperature of each day.
And since the temperature is different across states, we analyzed correlation independently for all states.
This graph shows Pearson’s correlation of all state.
Each bar represents correlation of each state, and the size and color indicates values.
You can easily observe that most states present positive correlation between positive affect and temeprature. In other words, in high temeperature day, people feel more postive feelings across states.
However, some states feel less postive affects in high temeperature days.
That is, (green box).
----- Meeting Notes (2013. 12. 4. 15:14) -----
1ve
Result in previous slide shows that people shows different patterns of sentiments across region.
However, it does not show exact relationship between positive affect and temperature.
Therefore, we investigate correlation of positive affect and temperature of each day.
And since the temperature is different across states, we analyzed correlation independently for all states.
This graph shows Pearson’s correlation of all state.
Each bar represents correlation of each state, and the size and color indicates values.
You can easily observe that most states present positive correlation between positive affect and temeprature. In other words, in high temeperature day, people feel more postive feelings across states.
However, some states feel less postive affects in high temeperature days.
That is, (green box).
----- Meeting Notes (2013. 12. 4. 15:14) -----
1ve
This is conclusion.
Indeed, there exists relationship between weather and mood. even in Twitter.
However, the effects of weather on mood vary across region.
It might be the notion of good weather can be different against each state, for example, Arizonans preferred humid days and Hawaiians preferred low atmospheric pressures.
From the existing work that there is individual differences to feel weather, we could say that people feel weather differently across region.
In future works, we could attempt to understand cultural and economic factors by examining wide geographical regions.