README.md

Lifecycle: experimental

~trendyy~

(>^.^)> ~ Tidy Access to Google Trends ~ <(^.^<)

trendyy is a package to provide a tidy interface to the gtrendsR package by Philippe Massicotte.

The idea was to provide an interface to the package that is tibble friendly. This package provides accessor functions to the various data frames that gtrendsR provides.

Usage:

trendy() enables you to query Google Trends. The only required argument is search_terms. If you submit 5 or few search terms as a character vector, the terms will be compared to eachother. If more than 5 terms are submitted, each will be qeuried on it's own.

Optionally, you can provide a desired date range in the format of "YYYY-MM-DD" to the from and to arguments. Other arguments that are passed to gtrendsR::gtrends() are also valid, including the time argument.

trendy() returns an object of class trendy. To access the tables, use any of the accessor functions below:

Example:

library(trendyy)
library(dplyr)



ob <- trendy("Obama", 
             from = Sys.Date() - 365,
             to = Sys.Date()) %>% 
        get_interest()


JosiahParry/trendyy documentation built on June 4, 2019, 7:47 a.m.