twitteR (version 1.1.9)

getTrends: 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 hashtags, will exclude hashtags
...
Additional arguments to be passed to RCurl

Value

A data.frame with the columns specified in Details above

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.

Examples

Run this code
  ## Not run: 
#     woeid = availableTrendLocations[1, "woeid"]
#     t1 <- getTrends(woeid)
#   ## End(Not run)

Run the code above in your browser using DataLab