Saturday, April 06, 2013

How to get daily Google Trends data for more than 90 days (Excel)

Note: This post describes how to combine Google Trends series using Excel. If you wish to use R, please read this article.

Google Trends is a great source for insight, but the tool can be a bit limiting. For instance, it is only possible to download daily search data three months at a time. Google Trends will give you weekly data for up to a year at a time, and after that only monthly data. Since the data is provided in an index format, we need to adjust the independent indexes. So how can we merge the quarterly time series into a yearly time series with daily data?

The three graphs show the problem of merging quarterly data directly. By using the weekly data as a benchmark we can create an accurate index with daily data.

Step 1 

Download the data in 90-day increments. In this example I assume that we want a whole year worth of daily data, that means four csv files to merge.

  • Report (1).csv: January - March 2012 
  • Report (2).csv: April - June 2012 
  • Report (3).csv: July - September 2012 
  • Report (4).csv: October - December 2012 

Step 2 

Download the weekly data for the same year.

  • Report (5).csv: January - December 2012 

Step 3 

Merge the daily data files into one Excel spreadsheet. Leave a gap in between each quarter so you remember where the adjustment must be made.

Step 4 

This is where we need to adjust the indexes based on the weekly data file we downloaded. We will do this based on the weekly time series data for the whole year we also downloaded. At the start of each quarter, write the corresponding index value from the weekly data. Then calculate the percentage change between the days and add that to the new index value. Repeat for each quarter and you have created a new yearly index with daily data.


19 comments:

Unknown said...

Do you have an example file for this?

Thanks a lot!

Anonymous said...

Hey there, I have tried following these instructions and have a challenge where the previous value is 0, since you can not divide by zero how does one avoid this problem?

ErikJJ said...

I would suggest simply ignoring it. Another approach is to use the differentiated values. I did a comparison of the differentiated time series before and after reindexing, and the impact is minimal.

ErikJJ said...

For those interested in getting deeper into using Google Trends, I'm building on an R-script for data collection. https://gist.github.com/321k/823cce9769e58bc14214

Aleks said...

nice solution. but what about the 'join' in between the 90-day series? i suppose it's the price you pay!

ErikJJ said...

Here's an example file that combines 90 days of daily data during 2013 for the search term "Quora".

https://www.dropbox.com/sh/8j57o6q0ioqjmnc/AADDxNMJyvugHsDxcS9hNoOHa

Anonymous said...

So this process would be interpolation of data?

Anonymous said...

Hi Erik, I need some guidance as to how it is done. Specifically, I've downloaded search data for the keyword "real estate" for 2013, and in obtaining the weekly SVI date begins from 6th Jan 2013-12 Jan 2013 rather than 1 Jan 2013. My question is....in having to enter the value of the index into the corresponding value in the first of each quarter, the values are different, i.e. does it necessarily matter?

Thanks in advance.

Khoa Nguyen said...

Hi, I made a Windows program that will do this automatically for you. You just need to manually download the csv files.

https://github.com/knguyen1/WPF.Google.Trends.Combinator

Unknown said...


You are an awesome blogger. This is one of the best blog I had visited so far. Hope to read more post from you in the future. Keep it up. God bless.

Bubble
www.gofastek.com

ErikJJ said...

For those of you using R, here's a working example that you can copy paste (as long as you have the libraries listed up top installed). https://github.com/321k/Google-Trends/blob/master/Daily%20data%20example.R

Anonymous said...

Ho can i manually download 90-day data (daily) from the year 2015? I tried shifting the dates but it always go automatically to 2008 to present.

Anonymous said...

PLEASE INSTRUCT ME HOW TO CONVERT WEEKLY DATA, SAY BETWEEN 2011:Q1-2016:Q2 TO QUARTERLY DATA? THAT IS, I AM LOOKING FOR A GOOGLE TREND NUMBER FOR EACH QUARTER.

Anonymous said...

Thanks!

But when using this method, I get adjusted values that are larger than 100. How can I solve this problem?

Carl said...

Hey,

I have some trouble following your instructions. Just to be sure, what you do is you take the weekly value for the first week of the quarter and afterwards you multiply all the daily percentage changes (relative to the first day of the week from which you got the the weekly value). That is the procedure you do for every quarter of the time period right? So you basically only use four of the weekly values per year? Also what do you do if you want daily data for more than 10 years (for which you only get monthly data). do you simply use the monthly data instead of the weekly data (so the monthly values for january, april, july, october)?
Unfortunately the example file is not accessible anymore.
Also could you explain why this is the right way to reindex?
Also related to this problem: the R code you developed which does this automatically does not work anymore because the googletrends urls changed (or at least that is what I think what happened). Do you know of any quick fix or alternative R code?
I would be very very glad if you could help me out.
Thank you very much in advance.

Elizabeth said...

I was so anxiuos to know what my husband was always doing late outside the house so i started contacting hackers and was scamed severly until i almost gave up then i contacted this one hacker and he delivered a good job showing evidences i needed from the apps on his phone like whatsapp,facebook,instagram and others and i went ahead to file my divorce papers with the evidences i got,He also went ahead to get me back some of my lost money i sent to those other fake hackers,every dollar i spent on these jobs was worth it.Contact him so he also help you.
mail: premiumhackservices@gmail.com
text or call +1 4016006790

charles said...

You need personal informations from companies,family and friends that will better your life and you need easy access without them noticing just contact nick or you’re financially unstable or you have a bad credit score, he will solve that without stress,he and his team can clear criminal records without leaving a trace and can also anonymously credit your empty credit cards with funds you need,all these are not done free obviously but I like working with nick and his team cause they keep you updated on every step taken in order to achieve the goal and they also deliver on time,I tested and confirmed this I’m still happy on how my life is improving after my encounter with him ,you can send a mail to vladislav.nickhack@outlook.com
Text/Call +17078685071

Rebecca Michaelson said...

HELLO VIEWERS

TESTIMONY ON HOW I GOT MY LOAN €300,000.00EURO FROM A FINANCE COMPANY LAST WEEK Email for immediate response: drbenjaminfinance@gmail.com

Do you need a loan to start a business or pay your debts {Dr.Benjamin Scarlett Owen} can also help you with a legit loan offer. He Has also helped some other colleagues of mine with a loan finance. Get your Blank ATM card or CREDIT CARD deliver to your doorstep that works in all ATM machines all over the world with the help of BENJAMIN LOAN FINANCE the ATM cards can be used to withdraw at the ATM Machines or swipe, at stores and POS. they give out this cards to all interested clients worldwide, If you need a loan without cost/stress he his the right loan lender to wipe away your financial problems and crisis today. BENJAMIN LOAN FINANCE holds all of the information about how to obtain money quickly and painlessly via Email drbenjaminfinance@gmail.com

patialalegitimate said...

Are you in need of Loan? Here all problem regarding Loans is solve between a short period of time what are you waiting for apply now and solve your problem or start a business with funds Contact us now. many more 2% interest rate.(Whats App) number +919394133968 patialalegitimate515@gmail.com
Mr Sorina

Entertaining Blogs - BlogCatalog Blog Directory
Bloggtoppen.se