View source: R/gtpreparation.R
gtpreparation | R Documentation |
gtpreparation
downloads for
various search requests respective categories
data and applies a logarithmic transformation aswell as a
seasonal adjustment on downloaded data.
The function returns seasonal adjusted
first derivatives (lagged if desired).
gtpreparation( keyword = NA, category = 0, geo = "DE", time = str_c("2006-01-01 ", Sys.Date()), lags = 0 )
keyword |
A character vector with search requests. |
category |
A numerical category ID from Google Trends. As of now,
only one category can be given. If you need to use more categories,
the use of a |
geo |
A geographical region to restrict the search queries to. |
time |
Time period from where the relative values should be taken
(for more information, visit the
documentation of |
lags |
Number of delays in additional columns (max. value: 4).
Be careful, the first |
Firstly, each row will be log transformed and
seasonal adjusted (via seasonal::seas()
's X-13 ARIMA methods).
Furthermore, the first derivatives of these adjusted time
series will be returned
(optionally with additional columns containing
lags).
gtpreparation(keyword = "ikea", time = "2015-01-01 2021-01-01")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.