getTrends: Functions to view Twitter trends

Description Usage Arguments Details Value Author(s) Examples

Description

These functions will allow you to interact with the trend portion of the Twitter API

Usage

1
2
3

Arguments

woeid

A numerical identification code describing a location, a Yahoo! Where On Earth ID

lat

A numerical latitude value, between -180 and 180 inclusive. West is negative, East is positive

long

A numerical longitude value, between -180 and 180 inclusive. South is negative, North is positive

exclude

If set to hashtags, will exclude hashtags

...

Additional arguments to be passed to RCurl

Details

The availableTrendLocations and closestTrendLocations functions will return a data.frame with three columns - name, country and woeid. The closestTrendLocations function will return the locations closest to the specified latitude and longitude.

The getTrends function takes a specified woeid and returns the trending topics associated with that woeid. It returns a data.frame with the columns being name, url, promoted_content, query and woeid - one row per trend.

Value

A data.frame with the columns specified in Details above

Author(s)

Jeff Gentry

Examples

1
2
3
4
5
  ## Not run: 
    woeid = availableTrendLocations[1, "woeid"]
    t1 <- getTrends(woeid)
  
## End(Not run)

twitteR documentation built on May 2, 2019, 6:46 a.m.