Analyzing tweets - time series analysis

The previous sections analyzed the content of tweets. In this section, we will discuss another interesting aspect of analyzing data from Twitter-the distribution of tweets over time.

Generally speaking, a time series is a sequence of data points that consists of successive observations over a given interval of time. As Twitter provides a created_at field with the precise timestamp of the tweet, we can rearrange tweets into temporal buckets so that we can examine how users react to real-time events. We are interested in observing how a population of users is tweeting, not just a single user, so the data gathered via the Streaming API is most suited for this type of analysis.

The analysis in this section uses ...

Get Mastering Social Media Mining with Python 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.