trends_available

0th

Percentile

trends_available

Returns Twitter trends based on requested WOEID.

Usage
trends_available(token = NULL, parse = TRUE)
Arguments
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 to return parsed (data.frames) or nested list (fromJSON) object. By default, parse = TRUE saves users from the time [and frustrations] associated with disentangling the Twitter API return objects.

Value

Data frame with WOEIDs. WOEID is a Yahoo! Where On Earth ID.

See Also

Other trends: find_woeid, get_trends

Aliases
  • trends_available
Examples
# 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 Worldwide trends data
ww_trends
# }
# NOT RUN {
# }
Documentation reproduced from package rtweet, version 0.3.0, License: MIT + file LICENSE

Community examples

Looks like there are no examples yet.