Showing posts with label google. Show all posts
Showing posts with label google. Show all posts

Tuesday, April 16, 2013

Who's searching for LeBron James?




In the previous post we analyzed the trend and seasonality in Google searches for Kobe Bryant. But how do these compare to the other most talked about superstar of the moment, Lebron James?

Here's the raw data from Google Trends:



Using the same decomposition analysis detailed in the Kobe Bryant post, we get the following results:

So what can we observe?

Well, the overall trend has been an increase since 2008 although there was a significant uplift in mid-2010 followed by a drop early 2011. Things have pretty much flattened since.

Similarly to Kobe, their is a strong seasonality in the searches, the amplitude of which has steadily increased over time. But unlike Kobe for whom the pattern was rather complex with a clear distinction between off-season, regular season and playoffs, Lebron's searches are not very different during the off-season and regular season, they only take off at the end of the season and during the playoffs.

But the residuals are really interesting here: look at that massive spike in July 2010. The playoffs were over by then, so what happened?


Well, Lebron became one of the most hated athletes (except in Florida perhaps) as he announced in a big show called "The Decision" that he would leave for the Miami Heat in the following season.

The other two spikes are in June, the first one when the Miami Heat lost to Dallas in the Finals, the second when Miami beat Oklahoma in the Finals.

However, if queries continue to spike regularly in June, the decomposition will incorporate those spikes as part of the seasonality, and the only big outliers will be major events like "The Decision" (there are rumors of Lebron returning to Cleveland, I anticipate an even bigger spike if that happens one day).


Monday, April 15, 2013

Who's searching for Kobe Bryant?




Unless you live on another planet without any WiFi connection to Facebook or Twitter, it was pretty hard to miss out on Kobe Bryant's injury in a crucial game against the Golden State Warriors last week. A torn Achilles has just ended his season (although to be fair I am not sure he will be missing that many games, even if Lakers do make the Playoffs...).

But this got me thinking: how many people searched for "Kobe Bryant" on the day and next of his injury? Could a huge spike be seen in Google Trends?




The above chart is at the monthly level so we only have partial April data. Nonetheless, Google Trends predicts that April 2013 will be Kobe's all star spike in searches, his MVP (most valuable peak) if you will.

But we also seem to notice some older spikes in the data, and a closer look reveals that these tend to regularly occur in June. What type of seasonal pattern lurks in the data?

In order to investigate seasonality, and also to tease out the underlying trend in searches for Kobe, I processed the data using R's stl() function (seasonal decomposition of a time series with loess) to split a time series into its trend, seasonal component and residuals.

Here's what I obtained:



We can't see the April spike yet because the downloaded data doesn't have Google Trends' estimates for the month, but we can predict a big spike given that halfway through April we already have almost as many queries as in a full month.

Going back to the figure, the top panel has the raw monthly data since 2004.

The next panel displays the smoothed loess trend. After a dip throughout 2004, Kobe has slowly but surely gained momentum since.

The next panel shows the seasonal component. We easily identify a strong pattern with a low volume in the off-season, an uplift when the season starts which remains quite constant during the regular season, another uplift during the playoffs with the maximum attained in June as we had observed previously.
It's also interesting to see how the seasonality's amplitude has steadily increased over the years.

Finally, the last panel shows the residuals, what cannot be explained by the trend and the seasonality. The cluster of yellow bars in the summer of 2004 could be due to the fact that Shaquille O'Neal was traded away from Los Angeles and there were many rumors around Kobe's future with the Lakers.

But how big the spike will be in April 2013 is anybody's guess!