As Australia’s national science agency, the Commonwealth Scientific and Industrial Research Organisation (CSIRO) has been pushing the edge of what’s possible for more than 85 years. Today the multidisciplinary research organization has more than 5,000 people working out of 55 centers in Australia and internationally. It plays a vital role in enhancing collaboration within the Australian national innovation system, and acts as a trusted advisor to government, industry, and the scientific community. It is in the top one percent of global research institutions in 14 of 22 research fields and in the top 0.1 percent in four research fields. Collectively, CSIRO’s innovation and excellence place it in the top 10 applied research agencies in the world.

Founded in 2002, the Black Dog Institute (BDI) is an Australian not-for-profit research body dedicated to improving the diagnosis, treatment, and prevention of various mood disorders. It aims to educate medical professionals and the general public about mental health problems, and provides a range of resources, including fact sheets and questionnaires, through its website. For example, general practitioners across Australia refer patients to BDI’s online mood assessment program (MAP), which analyzes personality type and helps distinguish between anxiety, bipolar disorder, and the various subtypes of clinical depression. With nine directors, 12 consultant psychiatrists, and numerous support staff, BDI continues to grow, attracting leading experts in the field of mental health and, with them, new grants and accolades. In 2013, BDI Executive Director Professor Helen Christensen was awarded the prestigious Founders Medal by the Australasian Society for Psychiatric Research.

Since May 2014, BDI has collaborated with CSIRO on research into the use of social media to monitor large-scale changes in mood. The We Feel study draws upon an enormous sample of data including hundreds of millions of tweets that are posted each day to Twitter. CSIRO proposed the study to the Black Dog Institute, which helped refine the concept before CSIRO implemented it.

According to previous research conducted at Boston’s Northeastern University, the content and structure of tweets can be analyzed to determine the emotional state of the person producing them. For example, a study at the University of Vermont Complex Systems Center merged the 5,000 words most frequently used in a range of sources, including Google Books, New York Times articles, and Twitter messages. These words were ranked from 1 (sad) to 9 (happy), and used to map the relationship between the happiness of the American population and a range of breaking news stories.

The designers of the We Feel study wanted to apply this basic approach to approximately 19,000 publicly accessible tweets per minute, drawing on a large amount of mood-related terms. Researchers hoped that the study would help them understand how strongly emotions depend on social and environmental factors such as the weather, the time of day, and current news.

To achieve their goals, the designers of the study had to confront three main challenges. First, the heavy volume of incoming data would require a large and flexible amount of computing power to collect the tweets in real time and analyze the results. Second, they needed to securely archive data so that patterns over time could be measured and published. Finally, it was important to make the findings available to, and understandable by, the public. To this end, they required a way to visually represent their findings in real time, using an emotional color-coding system that exploits the dataset of normative emotional ratings developed by the Center for Reading Research at Ghent University in Belgium.

The We Feel team was immediately attracted to Amazon Web Services (AWS) and its real-time Amazon Kinesis data processing service. “We knew AWS could provide the platform and capabilities that we required, and that made AWS an obvious choice for the projects,” says Dr. Cécile Paris, a research leader in language and social computing at CSIRO’s Digital Productivity Flagship. AWS saw the same potential for a fruitful partnership and decided to sponsor the project, including its products as part of a generous support package.

We Feel uses several Amazon Elastic Compute Cloud (Amazon EC2) instances to capture tweets from Twitter’s public API at an average of 19,000 tweets per minute. A separate Amazon EC2 instance processes the tweets, analyzing usernames to determine gender and identifying phrases that reveal emotional content. The information is funneled into an Amazon Kinesis stream, and the tweets are copied to a scalable Amazon Simple Storage Service (Amazon S3) for cold storage. The stream is monitored by another Amazon EC2 instance, which produces a summary of results every five minutes and transcribes it in an Amazon DynamoDB database. Brian Jin, a CSIRO software engineer and research project officer, regularly reviews each instance using Amazon CloudWatch, which enables him to monitor the network for unusual activity. Finally, Amazon Route 53 is used to direct incoming web traffic to the We Feel website, which is also hosted on AWS.

With ongoing funding from CSIRO, the We Feel team is now using AWS to analyze hundreds of millions of tweets before publishing the outcomes on its website. The result is groundbreaking insight into the emotional state of a large and demographically diverse population. Visitors to the website are able to drill into the results by gender, location, and emotional quality. There are currently six primary emotional categories – from joy to fear – with subcategories for more nuanced emotional states, like optimism and nervousness.

“It’s a tremendous tool,” says Dr. Paris. “By using AWS, we were able to get the application up and running in just a couple of months and now it’s allowing us to analyze millions of tweets in real time.”

We Feel is providing a macroscopic view that allows researchers to link shifts in mood to their social context. “For example, we were able to see interesting changes in mood around the launch of the 2014 Australian Federal Budget,” says Dr. Paris. “During the following week, we saw a 30 percent increase in fearful tweets and a 27 percent increase in angry ones. This type of analysis has never before been undertaken.”

Importantly, using the computational power of AWS has allowed researchers to focus on the results of their study without worrying about the resilience of their IT infrastructure. “In May of 2014, we experienced peak traffic, receiving 28,000 visitors to the We Feel website in a single day, and 70,276 during the month,” says Jin. “But there were no delays whatsoever. We’ve since experience near 100 percent uptime, with only one day offline for a scheduled network redesign.”

Jin is particularly enthusiastic about Amazon Kinesis, which he credits with providing the agility required to harvest and annotate large volumes of tweets in real time. “We were concerned that the system might be overwhelmed by incoming data, but we haven’t had any system faults due to these volume changes,” he says. “By keeping a 24-hour buffer, using Amazon Kinesis provides us with inherent fault tolerance—so, really, we have very little to worry about.”

The We Feel team plans to seek further funding to extend its research work and make better use of Twitter location data, paving the way in analyzing the relationship between location and emotional state. Ultimately, a better understanding of the “when, why, and where” of population mood changes promises to help organizations like BDI more accurately target mental health information and services. This could improve mental health care for people at the times they are most in need.

“Without the power and flexibility provided by the AWS platform, this project would simply not have been possible,” says Professor Christensen. “The results we’ve been able to achieve are beyond our expectations.”

To learn more about how AWS can be used by healthcare providers, visit our AWS Healthcare details page.