Site icon R-bloggers

Understanding New Year’s Resolutions with Google Trends in R

[This article was first published on Big Data Doctor » R, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

2015 just kicked off and we all are familiar with the process of making resolutions for the new year. It happens every single year across the globe… and the list of top resolutions looks pretty much the same everywhere… Quit smoking, join a gym, eat healthier… sounds familiar?
I came to the idea of using the usual suspects in the New Year’s Resolutions list to understand to which degree different countries are similar to each others. The criteria for picking these 6 countries are pretty much straight forward,  I just went for the 6 countries I’ve been more related to in the course of my life.
The mix is very interesting though: two anglistic countries (US and Great Britain), three Mediterranean romanic countries (France, Italy and Spain) and Germany.

The methodology I followed to get to results is quite easy:

  1. Initial exploration looking for the terms that identify each and every New Year Resolution in the local language of the selected countries
  2. A simple data gathering with a modified version of the R Google Trend package created by Chris Okugami
  3. A bit of charting with ggplot2 to generate the trends comparison charts
  4. A home-backed function for the pairwise (country-by-country) trend lines correlation per New Year Resolution
  5. More charting with ggplot2 to visualize the correlation results

Of course, the R code is provided at the end of the post, for those who want to give it a play
So, let’s go through the list:

1) I want to quit smoking

 

I’m not going to smoke in 2015 anymore! I’m sure we all have heard that quite often in the last days… Even the US government set up a web site to support that. This is the probably the most popular resolution, overly present in all 6 countries, but with certain nuances:

US and GB (our “anglos”), showing the same pattern, which doesn’t surprise us much. Italy and France very much aligned on their way towards a smoking-free society.

Spain and Germany, close to each other and close to the United Kingdom, but surprisingly (especially for Spain), pretty distant from their Mediterranean neighbors. This one took me!

Also remarkable is the after-summer peak in France and Italy (and a bit in Spain) in 2012, due to some changes in the regulations.

2) I want to lose weight


Also a very typical sentence from the first week of the year: “Actually I can’t eat that, because I’m on diet!”. Same behavior in all 6 countries? Not quite… In Spain, Italy and France, people revisit this resolution in May, right before the summer start, to get in good shape and to show off later in July and August at the beach. In Spain it even got a name: “Operación Bikini”.

US and Great Britain take it very seriously in January, to later lose gradually enthusiasm as the year proceeds, especially noticeable in the last quarter.

Germany is a bit like the English speaking countries concerning losing weight… astonishing close to Great Britain, with a correlation coefficient of 0.85.

 

3) I’m going to join a gym / I want to get in better shape

This analysis shows us an interesting phenomenon in the Mediterranean countries. The New Year Resolutions take place twice a year… and sometimes the second time is even taken more seriously! It makes sense because in France, Italy and especially in Spain, holidays follow a strict schedule -most probably because of the weather-: July and August. And what do people do after a long vacation? Bingo! Time to change things! Time to get back in good shape! That explains the peaks in September!

Americans, Britons and Krauts are very aligned as well, but not showing the September high, as this strict rule for scheduling vacations does not apply.

 

4) I’m going to find the love of my life


New Year brings new hope… also for those who haven’t found this especial “somebody” to share their lives with. Dating platforms boom… even going mobile and location-based like tinder.

The countries under analysis behave quite own their own regarding that. We certainly see the January peak, and a second peak in summer time for all 6 countries, but the global trend differs substantially from each other.

While Italy, in Great Britain and France the trend decays, in Spain and to some degree also in Germany, it gets clearly upwards.

 

5) I’m going to take more time for me – I’m going to go on vacation

We all know these people who want to start off a new year with some light at the end of tunnel, with a particular point in time to enjoy a new country or just to take some time off.

There are 2 different behaviors regarding this good resolution: countries where it doesn’t manifest at all, like Italy or Spain (typically late-bookers) and where vacation is synonym of summer time, and the other countries, where the vacation planning starts quite early in the year.

Springtime comes earlier in countries where the winter is not that hard, like Spain, so people can bridge until summer. In Germany, for example, it’s unthinkable… people go for a break in winter.

 

6) This year, I’m going to eat much better – Only healthy food!

Changing eating habits is a typical one we usually leave for the next year and start trying in January. No surprises here, all our selected countries comply.

Germany-Spain, and Germany-GB  showing correlation coefficients over 0.75 are heavily aligned. Spain and GB less aligned though.

US just with GB, and Italy and France, while also complying, not showing such a strong alignment.

What I think it’s encouraging is the fact that the overall trend in all 6 countries is going up.. So well and stays high got a good portion of the year, especially in Germany.

Kind of a summary

  1. If you ask people in a country, they can name you a set of countries, they think they are similar to… But actually, it’s damn easy to double-check based on the searching habits.
  2. Google Trends is an awesome tool to understand differences between countries based on people behaviors, which naturally translates into internet searches
  3. This analysis is as good as the previous work done to identify the words that identify a topic… Direct translations don’t work quite often, so you need to get a native to help you a bit or be familiar with the language
  4. Countries are very heterogeneous… and some of them very big -take US-… it might be also interesting to get a more granular geographical understanding

As promised, you can find the code in R to replicate my analysis, to play with other countries, etc, just here… Have fun!

To leave a comment for the author, please follow the link and comment on their blog: Big Data Doctor » R.

R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.