Mood of The City (Twitter powered mood lamp)

This Twitter Mood Lamp seeks to visualize the mood of the city of Denver Colorado. To this end, it is an Arduino Yun controlled 3D printed lamp that glows red, green, or blue based on whether the mood of the city is perceived to be angry, happy, or sad respectively. The mood of the city is calculated by scraping the Twitter API with the help of Temboo for specific keywords that might indicate the emotional state of the tweeters. To restrict this to Denver, the latitude and longitude of the center of Denver was provided and only tweets within a 12 mile radius were retrieved. As they’re retrieved, these tweets are outputted onto the Arduino Yun’s serial monitor as well as classified under an emotional state. A running tally is kept of the mood and the lamp glows the color associated with the predominant mood. If its intended use is for an extended period of time, the tally can be enabled to forget tweets retrieved longer than an hour ago. Alternatively, it can scrape twitter at specified intervals and glow the mood associated with tweets only made it in that duration. What color is your city?  (The Code is open source and included below the pictures)

DSC02252 DSC02254 DSC02256