Description Usage Arguments Details Value Author(s) See Also Examples
Streams tweets' location and time to Google Earth.
1 2 | stream2earth(search_term, oauth, labels, size, duration = 3600, window = 5,
shape = "http://maps.google.com/mapfiles/kml/pal2/icon18.png", ...)
|
search_term, |
required. Search to use in API call. |
oauth, |
required. Your oauth token as used in streamR package. See examples. |
labels, |
requried. Labels to use on Google Earth. must be inherited
from |
size, |
required. Size of shape. must be inherited from
|
duration, |
requried. Number of seconds to stream, defaults to
|
window, |
required. Duration of each streaming window in seconds.
Defaults to |
shape, |
required. Shape to use on Google Earth. Defaults to
|
... |
Optional arguments to pass to streamR filterStream function. |
labels
, size
parameters must be inherited from filterStream
.
Available labels and size parameters are;
text
favorited
id_str
source
created_at
in_reply_to_user_id_str
listed_count
location
description
user_created_at
followers_count
protected
names
user_lang
friends_count
time
retweet_count
truncated
in_reply_to_screen_name
retweeted
in_reply_to_status_id_str
lang
verified
user_id_str
geo_enabled
statuses_count
favourites_count
user_url
time_zone
utc_offset
screen_name
Opens Google Earth and plots tweet location and created time in near-real time.
Jabber Cruncher, john.coene@jabber-cruncher.com
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | ## Not run:
# OAuth setup - from App (http://apps.twitter.com/)
requestURL <- "https://api.twitter.com/oauth/request_token"
accessURL <- "https://api.twitter.com/oauth/access_token"
authURL <- "https://api.twitter.com/oauth/authorize"
my_oauth <- OAuthFactory$new(consumerKey = "your_consumer_key",
consumerSecret = "your_consumer_secret",
requestURL = requestURL, accessURL = accessURL,
authURL = authURL)
# download cacert.pem
download.file(url="http://curl.haxx.se/ca/cacert.pem", destfile="cacert.pem")
# Register OAuth
my_oauth$handshake(cainfo = system.file("CurlSSL", "cacert.pem",
package = "RCurl"))
#Run stream for 2 days with windows of 7 seconds looking for keyword #rstats
stream2Earth("rstats", my_oauth, "screen_name", "retweet_count",
duration = 2, window = 7)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.