R Markdown

This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see http://rmarkdown.rstudio.com.

Required Packages

# Run once to install
options(repos = c(CRAN = "https://cloud.r-project.org"))
install.packages(c("gtrendsR", "tidyverse", "ggplot2", "scales",
                   "lubridate", "knitr", "kableExtra"))
## 
## The downloaded binary packages are in
##  /var/folders/57/fp14p_5j6jn10qy8l9x_c99c0000gn/T//RtmpwfoPpt/downloaded_packages
library(gtrendsR)     # Pull data from Google Trends
library(tidyverse)    # Data manipulation and plotting
library(ggplot2)      # Visualization
library(scales)       # Axis formatting
library(lubridate)    # Date handling
library(knitr)        # Tables
library(kableExtra)   # Enhanced table formatting

Understanding the gtrends() Function

Tutorial 1: Single Keyword — Brand Search Interest

References

Google Trends. (2024). Google Trends Tutorials [YouTube series]. Google Search Central. https://developers.google.com/search/blog/2024/09/google-trends-tutorials Massicotte, P., & Eddelbuettel, D. (2023). gtrendsR: Perform and Display Google Trends Queries [R package]. https://cran.r-project.org/package=gtrendsR Chan, M. (2019). Vignette: Google Trends with the gtrendsR package. https://martinctc.github.io/blog/vignette-google-trends-with-gtrendsr/