rtweet (version 0.3.7)

get_trends: get_trends

Description

Returns Twitter trends

Usage

get_trends(woeid = 1, exclude = FALSE, token = NULL, parse = TRUE)

Arguments

woeid
Numeric, WOEID (Yahoo! Where On Earth ID) or character string of desired town or country. To browse all available trend places, see trends_available
exclude
Logical, indicating whether or not to exclude hashtags
token
OAuth token. By default token = NULL fetches a non-exhausted token from an environment variable. Find instructions on how to create tokens and setup an environment variable in the tokens vignette (in r, send ?tokens to console).
parse
Logical, indicating whether or not to parse return trends data.

Value

Trend data for a given location.

See Also

Other trends: find_woeid, trends_available

Examples

Run this code
## Not run: 
# # Retrieve available trends
# trends <- available_trends()
# trends
# 
# # Store WOEID for Worldwide trends
# worldwide <- subset(trends, name == "Worldwide")[["woeid"]]
# 
# # Retrieve worldwide trends datadata
# ww_trends <- get_trends(woeid = worldwide)
# 
# # Preview trends data
# ww_trends
# ## End(Not run)

Run the code above in your browser using DataLab