getTrends {twitteR} | R Documentation |
Functions to view Twitter trends
Description
These functions will allow you to interact with the trend portion of the Twitter API
Usage
availableTrendLocations(...)
closestTrendLocations(lat, long, ...)
getTrends(woeid, exclude=NULL, ...)
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 |
... |
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
## Not run:
woeid = availableTrendLocations[1, "woeid"]
t1 <- getTrends(woeid)
## End(Not run)