Download presentation
Presentation is loading. Please wait.
Published byIda Mattila Modified over 6 years ago
1
A light based visualization of sentiment in Tweets
BiasBeacon A light based visualization of sentiment in Tweets By: Stephen Bunn, Preston Wilson, Ian Watts, Bryce Cloniger Stephen
2
Table of Contents Our Goal Inspiration Color Model Equipment
Limitations Application Demonstration Gained Experience Citations Table of Contents Stephen
3
Our Goal Wanted to visualize the mood of Twitter tweets as color
Gain experience working with… Python Social media APIs Building HTTP requests Basic sentiment classification Version control Preston
4
Inspiration North Carolina State University research project “Sentiment Viz” by Healey and Ramaswamy. Grabs the most recent tweets given a term Visualizes those tweets on an emotional scale Allows the user to interact with the results We stole Michael Yang’s idea... Ian
5
Sentiment visualization with Tweets using the term “grand canyon”
Ian Sentiment visualization with Tweets using the term “grand canyon”
6
Color Model Russell's Model of Emotional Affect
Maps terms on a two-dimensional scale between arousal and pleasantness The ANEW (Affective Norms of English Words) dataset maps english words to this model Utilized HSL (Hue, Saturation, Lightness) to map this model to color Utilized a Python module named HUSL, to convert HSL to RGB Bryce
7
Russel’s Model of Emotional Affect applied to the HSL color format
Bryce Russel’s Model of Emotional Affect applied to the HSL color format
8
Equipment Python was used to develop our project
Used the Philips Hue Go as our beacon Used the Tweepy module to collect tweets A user built “ANEW” dataset by Tom Lee Ian
9
Limitations We could not get a copy of the real ANEW dataset
Used Tom Lee’s derived ANEW dataset We also could not set up our Philips Hue bridge on ASU’s layered network Setup our own network using a consumer router Stephen
10
Our Application
11
Getting the tweets Used the Tweepy Python module and Twitter’s search API Retrieved a defined amount of Tweets given a passed search term import tweepy oauth = tweepy.OAuthHandler(CONSUMER_KEY, CONSUMER_TOKEN) oauth.set_access_token(ACCESS_KEY, ACCESS_TOKEN) api = tweepy.API(oauth) tweets = tweepy.Cursor(api.search, q='#tweepy').items(list) Bryce
12
Classifying the tweets
Basic sentiment classification using the ANEW dataset entries health, v = (mu: 6.81, sigma: 1.88), a = (mu: 5.13, sigma: 2.34), freq = 105 win, v = (mu: 8.38, sigma: 0.92), a = (mu: 7.72, sigma: 2.16), freq = 55 We use the probability density function of a normal distribution to estimate the probability density of the word’s rating falling exactly at the mean. Then using a weighted average we can find the mean valence and arousal. Mv = 7.76, Ma = 6.48 Stephen
13
Displaying the mood Wrote a basic client to handle updating the state of our beacon Also handles discovery and management of the Philips Hue Bridge import bias_beacon beacon_client = bias_beacon.BeaconClient( bridge_ip=bias_beacon.utils.mac2ip(BEACON_BRIDGE_MAC), username=bias_beacon.glbl.MODULE_NAME, beacon_uid=BEACON_UID ) beacon_client.update_on(True) beacon_client.update_color(255, 0, 0) Preston
14
A plotting of 1000 tweets using the term “hate” or the hashtag #hate
Preston A plotting of 1000 tweets using the term “hate” or the hashtag #hate
15
Demo
16
Russel’s Model of Emotional Affect applied to the HSL color format
17
Gained Experience Learned about basic sentiment classification
Used Python to implement communication between Twitter and the Hue Learned how to use version control systems such as GitHub Gained experience working as a team Ian
18
Questions?
19
Citations Twitter Visualization
Russel’s model of emotional affect Tom Lee, ANEW dataset Tweepy Philips Hue API
Similar presentations
© 2025 SlidePlayer.com Inc.
All rights reserved.