Tag Archives: Twitter Firehose

Analyzing real-time tweets with PubNub’s Data Stream


How’s America feeling? With PubNub’s real-time Twitter Stream, you can find out.


By now, many of us have become used to the ubiquity of streams when it comes to consuming content online, ranging from RSS feeds and blogs to social media channels and services. Drinking from a data firehose API is a powerful and fast way to stream data from any source in realtime, whether it be weather reports, stock quotes or tweets, updated as they change. To do this, one needs a robust and fast data stream network to transfer the data packets through, presenting it to your end users in real-time.

B4WdZ2pCAAAtC8_1

Subsequently, PubNub recently released a demo Twitter Stream published through their hosted websockets, which can be consumed on a variety of platforms using one of their many SDKs. This enables a developer to skip the complicated process of long polling and writing the front-end code with JavaScript, as well as sending and receiving JSON data. Now, with its new realtime Twitter Firehose Stream, users can consume and turn this public data into visualizations.

PubNub2

Just as its name implies, Twitter Stream is a realtime steam of actual tweets on Twitter at a maximum rate of 50 tweets per second. With it, you can build cool things like realtime tweet boards, as well as crunch data for social interactions in specific regions, or based on specific keywords. To demonstrate its speed and scalability, the PubNub devised a demo to display tweets by analyzing how people throughout the U.S. are feeling emotionally at any given moment. The demo works by looking for certain words and emoticons in the incoming Twitter Firehose Stream that indicate the person’s mood, then mapping that person by state.

PubNub_1-1

Through its collaboration with the social network, another one of PubNub’s streams included a list of Spotify albums people are listening to on Twitter. Inspired by the iTunes album artwork screensaver, the team created a visualization of the latest album artwork appearing on their Twitter firehouse sample. The result is an ambient background fueled by real listeners, which can be viewed here.

“Thanks to PubNub, Twitter and Embedly, this app exists entirely on the front end.” Ian Jennings writes. “You can even fork and edit the app in CodePen.”

Interested in learning more? First, check out this Twitter emotion stream app, then continue on to its album visualization, and finish up by reading the team’s entire tutorial. Don’t forget to check out PubNub’s Doron Sherman’s latest piece on securing the Internet of Streams, too!