gtsearch: Simple Google Trends data search

View source: R/gtsearch.R

gtsearchR Documentation

Simple Google Trends data search

Description

gtsearch() is a simple wrapper around the gtrendsR::gtrends() function. It only returns a time series in form of a tibble with the actual (in relative terms) search volume of keywords or categories.

Usage

gtsearch(
  keyword = NA,
  category = 0,
  geo = "DE",
  timeframe = paste("2006-01-01", Sys.Date()),
  as_tbl_ts = TRUE
)

Arguments

keyword

A vector (chr) of keywords to search for.

category

A single numeric value stating the category number. To search for multiple categories at once is as of today not possible. Use an for-loop instead.

geo

The region to search in (e.g. for Germany "DE").

timeframe

A time frame to search the queries in consisting of a start date and an end date in YYYY-MM-DD form.

as_tbl_ts

Logical value to determine if tibble should already be coerced to a tsibble with keyword or category column as key.

Details

gtsearch() returns a simple tibble with the original interest data in a keyword or category from Google Trends.

Value

A tsibble with a time series of Google Trends search volume from given inputs and the keyword respective category as key for it.

Examples

gtsearch(keyword = c("pluto", "saturn"), timeframe = "2020-01-01 2020-06-01")

johannes97s/ifwtrends documentation built on Oct. 9, 2022, 7:01 p.m.