Get startedGet started for free

Power of twitter data

The volume and velocity of tweets posted on twitter every second is an indicator of the power of twitter data.

The enormous amount of information available, from the tweet text and its metadata, gives great scope for analyzing extracted tweets and deriving insights.

Let's extract a 1% random sample of live tweets using stream_tweets() for a 120 seconds window and save it in a data frame.

The dimensions of the data frame will give you insights about the number of live tweets extracted and the number of columns that contain the actual tweeted text and metadata on the tweets.

This exercise is part of the course

Analyzing Social Media Data in R

View Course

Exercise instructions

  • Extract live tweets for 120 seconds time window.
  • View dimensions of the data frame with the extracted tweets.

Hands-on interactive exercise

Have a go at this exercise by completing this sample code.

# Extract live tweets for 120 seconds window
tweets120s <- stream_tweets("", timeout = ___)

# View dimensions of the data frame with live tweets
dim(___)
Edit and Run Code