This week in Data Without Borders we covered extrapolating data from time series events with R. Time series events are usually defined as a one dimensional value measured at different times. For instance, the value of a stock over the course of a month, or tweets with #WorldSeries over the past week.

The two major questions to investigate in time series are:

  1. Which events signal anomalies?
  2. Are there cycles (“seasonality”) present?

The code block below takes tweets mentioning Iran over the course of five days. The purpose of this assignment is to locate when there’s an unusually high velocity of tweets mentioning Iran, and investigate the text of those tweets, or better yet, why is Iran trending on Twitter?

In short, the tweets where there’s the largest velocity in number of tweets mentioning Iran are talking about the Iranian elections, and how both candidates are declaring victory.