Analysis of Filipino Mood Swings within a Day using Tweets
Rodalyn A. Balajadia, Vincent Louie L. Maglambayan and Maria Teresa R. Pulido
Department of Physics, Mapúa University, Manila City, 1002, Philippines
Keywords: Data Analytics, Big Data Algorithm, Social Science and Implications for Big Data, APIs, User Evaluations
and Case Studies, Microblogging, Twitter, Opinion Mining.
Abstract: We infer moods and how they vary with time using a dataset from the social media application Twitter. We
used Python text mining techniques to gather all tweets originating from the Philippines within a span of 24
hours. From the dataset of around 130,000 tweets, we gathered the highest-frequency words and filtered out
neutral words to come up with words that imply mood levels. We then plotted the density of keyword usage
with respect to time, distinguishing between positive and negative moods. Our initial results of positive mood
and negative mood trends are consistent with published studies regarding microblogging mood scales. The
emergence of Big Data and the Internet of Things has greatly amplifed our ability not only to express ourselves
but to understand each other.
1 INTRODUCTION
Moods affect physical and emotional well-being,
creativity, decision-making, and immune response
(Ashby, et al, 2002). Studies have shown that mood
swings within the day heavily affect circadian
rhythms of core body temperature (Boivin et al.,
1997). In particular, positive moods have been found
to peak twice: at noon and at evening (Hasler et al.,
2008). Meanwhile, motivation is defined as a drive to
behave in certain ways that comes from internal and
external drivers and rewards such as mood (Deci and
Ryan, 1985). Motivation is therefore intertwined with
diurnal mood swings in correlation to human
productivity.
Data mining enables us to make real-time
measurements of global moods, such as social and
political issues (O’Connor et al., 2010). In particular,
researchers use the social networking service Twitter
as “a global thought-stream on every topic
imaginable” (Parr, 2009) with data gathering and
analytical tools available to the public. Mislove et al.
(2011) used Twitter comments to measure the “pulse
of the nation” noting various time zones and days of
the week. Meanwhile, Golder and Macy (2011)
examined Twitter mood trends across diverse cultures
accounting for global seasonal mood rhythms and
individual-level diurnal moods. Bollen, Mao and
Zeng (2011) used large-scale Twitter feeds to
measure collective mood and predict the stock
market. Self-reports of positive or negative moods
may be conveyed through microblogging sites such
as Facebook, Tumblr, or Twitter. Therefore
individual behavior in real time can be collectively
studied by examining semantic contents in such
sources.
The purpose of this study is to analyze circadian
moods of Filipinos using popular keywords with
mood implications using Python text mining. This
paper explored mood “pulses” confined within the
coordinates of the Philippines by examining the
density of popular keywords in tweets on an hourly
basis. The gathering of tweets spanned for one
weekday, or 24 hours.
Our study is limited only to publicly accessible
accounts, in accordance with data privacy laws. Also,
tweets are not representative of all age groups, as
these are limited to retrospective self-reports of the
younger generation (mostly millennials) and a low
percentage of older people (Newberry, 2018). Lastly,
this work will analyze word frequency only, looking
at the literal meaning of tweets; figures of speech such
as metaphors and sarcasm may be studied with more
advanced language processing tools.
2 METHODOLOGY
We used a Python text mining program (Figure 1) to
collect tweets in a streaming fashion via Twitter API.