Learn R Programming

rtweet (version 1.2.1)

trends_available: Available Twitter trends along with associated WOEID.

Description

Available Twitter trends along with associated WOEID.

Usage

trends_available(token = NULL, parse = TRUE)

Value

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

Arguments

token

Use this to override authentication for a single API call. In many cases you are better off changing the default for all calls. See auth_as() for details.

parse

If TRUE, the default, returns a tidy data frame. Use FALSE to return the "raw" list corresponding to the JSON returned from the Twitter API.

References

https://developer.twitter.com/en/docs/twitter-api/v1/trends/locations-with-trending-topics/api-reference/get-trends-available

See Also

Other trends: get_trends()

Examples

Run this code
if (auth_has_default()) {
## Retrieve available trends
trends <- trends_available()
trends

}

Run the code above in your browser using DataLab