The Twitter bubble-gun applicationÂ portrays the strength of feeling onÂ given Twitter topics with the help of the HP IDOLÂ OnDemandÂ cloud services.
Individual tweets are represented by bubbles emitted from bubble guns or bubble clouds.Â The size and colour of individual tweets is determined by sentiment strength returned from the HP IDOL OnDemand Sentiment API.Â The application is intended for a large wall display so viewers can judge overall moodÂ on hot topics at a glance.
This is a Windows desktop application written in C#, .NET and WPF. Â It makes use ofÂ Tweetinvi Â to access Twitter and create a Tweet stream which is then piped through the HP IDOL OnDemand sentiment API and on to the bubble emitters. Movement of the bubbles is controlled by the Farseer physics engine. User interaction with bubbles and controls is managed by the Tangible Apps touch framework.
The bubble gun is the main emitter of twitter bubbles and each can have a different Twitter search phrase consisting of key words ANDed andÂ ORed together.Â An on-screen multi-touch keyboard is used to enter and edit the search phrase phrase. The multi-user nature of the Tangible Apps framework allows multiple bubble guns to be positioned and configured simultaneously which is especially useful for very large display screens. No queuing to use this application!
There are two types of bubble gun with associated different types of bubble: text or image.
- A text bubble contains the Twitter user icon plus the text of the tweet. Tapping a text bubble causes the text to be displayed in a larger, static window. If there is an image associated with the Tweet, this is displayed next to the text.
- An image bubble is only generated if there is an image associated with a Tweet. In this case, the bubble contains the image rather than the text. Tapping an image bubble causes the image to be displayed in a larger, static window where it can be resized and cropped for other purposes.
The colour and size of bubbles is determined by the IDOL OnDemand sentiment API.Â The text from each Tweet is posted up to the API which returns:
- aÂ list of phrases extracted from the text and used to judge the sentiment. Each phraseÂ contains the word used to determine the sentiment, the object of the sentiment and the sentiment value and strength.
- the aggregateÂ sentiment value and strength
This application uses the aggregate value.
Sentiment is expressed as “positive” or “negative” and the strength is a number between -1Â and +1, where -1 is totally negative and +1 is totally positive. Zero indicates neutral sentiment.
Bubbles associated with positive tweets are tintedÂ green and bubbles associated with negative tweets are tintedÂ red.
The stronger the sentiment the larger the bubble and hence the slower it moves. Hence, neutral Tweets tend to exit the desktop faster while the more interesting Tweets linger.
If a topic is very popular, the number of Tweets receivedÂ can easily swamp the application. Tweet request and processing and IDOL OnDemand requests are all handled on background threads. In addition, new Tweets are buffered and queued for processing by the rest of the pipeline. At any given moment, only the latest 500 Tweets are retained and the remainder are disposed of.
WhenÂ a bubble-gun creates bubbles in rapid succession, individual bubbles become lost as they are hidden by subsequent bubbles. The bubble cloud is an attempt to overcome this by increasing the number of nozzles through which bubbles on a given search are emitted. A bubble cloud has a fixed nozzle per unit length so increasing the length of a cloud increases the total number of nozzles available. Each new bubble is emitted through a randomly selected nozzle.
This application was used at a HP IDOL OnDemand innovation party in San Francisco so there was a branding element. IDOL OnDemand icons could be made to float about the screen at random. These icons then emitted further icons – inspired by the scene in Disney’s Wall-E where the little robot propels himself through space with a Â fire extinguisher.