Analyzing the streaming data

Let's have a look at the following steps:

  1. Open the command line interface of your choice.
  2. Got to the required directory where you have downloaded the code file.
cd Downloads/HandsOnBigData/CH08/json
  1. Let's use the script from here to view the contents of tweets in real time by running the LiveTweets.py script. To execute the LiveTweets.py script, run the following script:
./LiveTweets.py president

The output displays two columns—the first is the timestamp of the tweet, and the second is the text of the tweet:

The code snippet given for LiveTweets.py is given as follows:

#!/usr/bin/pythonimport jsonimport sys ...

Get Hands-On Big Data Modeling now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.