Description Usage Arguments Details Author(s) Examples
The function downloads time series from Google Trends based on a list of queries provided by the user, and stores them as .csv files either under the current working directory or elsewhere as speficied otherwise.
1 | get.trends(queries=NULL, geo="US", time="all", path=getwd())
|
quries |
a vector of quries to get Google Trends for. |
geo |
character, indicating the geographic location for the queries. Defualt is |
time |
character, indicating the time span for the queries. Defualt is |
path |
string, denoting the directory under which the csv files should be stored. |
Supported countries and their corresponding country codes can be found by calling data("countries")
. For more details, refer to gtrends
.
Zehua Wu
1 2 3 4 | dir="~/Documents/Inflation"
data("US_Inflation_Queries")
inflation<-as.character(US_Inflation_Queries$Queries)
get.trends(queries=inflation, geo="US", time="all", path=dir)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.