Description Usage Arguments Details Value Author(s) Examples
These functions will allow you to interact with the trend portion of the Twitter API
1 2 3 | availableTrendLocations(...)
closestTrendLocations(lat, long, ...)
getTrends(woeid, exclude=NULL, ...)
|
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 |
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.
A data.frame with the columns specified in Details
above
Jeff Gentry
1 2 3 4 5 | ## Not run:
woeid = availableTrendLocations[1, "woeid"]
t1 <- getTrends(woeid)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.