Sharing Is Caring:

Google Trends Data Mining Using R

Building an automated solution to download Google Trends data for a large number of terms.

  • Free tutorial
  • Rating: 3.9 out of 53.9 (38 ratings)
  • 1,949 students
  • 1hr 45min of on-demand video
  • Created by Sanjeev Baniwal Ph.D.
  • English

What you’ll learn

  • Set up your own process in R to autonomously download and process large amounts of Google Trends data.
  • Automate various tasks used in a day to day life of a data scientist through R.
  • Understand each line of code used in the course and how it fits in the bigger picture of a live project.
  • Two independent approaches used in the course to access Trends data will reinforce the concept of building R solutions from scratch. In one approach, we will exclusively use Base R methods, and in other, learn how to work with R packages.
  • You will be able to run various windows commands from R e.g. copy, rename, delete files on hard disc etc
  • Use Window’s Task Scheduler to have desktop run R in batch mode on recurring basis.
  • Your R toolbox will become much more diverse and applicable to a wide range of future projects.


  • No prerequisites, previous exposure to R and windows work environment will be helpful..
  • You will need access to R, Windows, Google account, Chrome.
Read Also -->   Learn Mobile Programming By Example With Codename One


Google Trends is a new tool in a Data Scientist or a Marketing Analyst’s tool box. It provides data that could be quite useful when assessing trend in general public interest in a particular product or an array of products. Trends data essentially gives us a way to assess how often a particular search was performed on world’s most popular search engine. 

However, Google Trends only allows a simultaneous search of up to five terms, also it does not provide data through a dedicated API. This course describes two processes in R which could be employed to circumvent both of these issues. First process stitches together R and Windows batch system. Second, utilize gtrendsR package. In both case we set up an automated process. 

 The course begins by describing Google Trends data itself, and then various R functions relevant to build the automated solution. In the third section, we apply the knowledge from previous sections to build a complete end to end solution. 

By the end of the course, we will better understand how R could be employed in more automated manner with minimum human involvement. Additionally, better appreciate the power of Google Trends data to provide a greater understanding of the way the world around us functions.

Who this course is for:

  • Those wanting to retrieve and explore large amounts of Google Trends data.
  • Students with beginner level of R understanding and those wanting to join course which is not typical beginner’s curriculum. We will stay focused on using R to automate a software process.
  • We will NOT deal with any statistics here!

Show less

Course content

4 sections • 14 lectures • 1h 44m total lengthCollapse all sections

Introduction to Google Trends web Search engine1 lecture • 7min

  • Introduction06:31

Understanding R functions one at a time9 lectures • 1hr 11min

  • Import Export of txt and csv files08:02
  • Data Frames in R Part 105:54
  • Data Frames in R Part 209:07
  • Performing system functions using R12:44
  • Understand lapply and docall functions in R07:10
  • Review Windows Batch processes08:03
  • Write a Windows Batch process from R04:52
  • Combinding the power of Batch files with R “For loops”09:50
  • Use of an Anchor search term to enable comparative analysis of Trends data05:14
Read Also -->   Python, Machine Learning, and Data science Course [2023]

Bringing it all together: Setting up the automated R process.2 lectures • 15min

  • Automating a Google Trends data download.08:14
  • Scheduling Trends Data Download using R script, .bat, and Task Scheduler06:50

Section 4: Using gTrendsR package2 lectures • 12min

  • Getting started with gTrendsR package05:12
  • Use gTrendsR to download large amounts of data06:52

👇👇👇👇 Click Below to Enroll in Free Udemy Course 👇👇👇👇

Go to Course

👇👇 See Also 👇👇

Join Us Join Us Join Us
Sharing Is Caring:

Leave a Comment

Ads Blocker Image Powered by Code Help Pro

Ads Blocker Detected!!!

We have detected that you are using extensions to block ads. Please support us by disabling these ads blocker.

Powered By
100% Free SEO Tools - Tool Kits PRO