stream2Earth: stream2earth

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Streams tweets' location and time to Google Earth.

Usage

1
2
stream2earth(search_term, oauth, labels, size, duration = 3600, window = 5,
  shape = "http://maps.google.com/mapfiles/kml/pal2/icon18.png", ...)

Arguments

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 filterStream (see details)

size,

required. Size of shape. must be inherited from filterStream (see details).

duration,

requried. Number of seconds to stream, defaults to 3600.

window,

required. Duration of each streaming window in seconds. Defaults to 5.

shape,

required. Shape to use on Google Earth. Defaults to .../icon18.png.

...

Optional arguments to pass to streamR filterStream function.

Details

labels, size parameters must be inherited from filterStream.

Available labels and size parameters are;

Value

Opens Google Earth and plots tweet location and created time in near-real time.

Author(s)

Jabber Cruncher, john.coene@jabber-cruncher.com

See Also

plot2earth

Examples

 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)

JohnCoene/tweets2earth documentation built on May 7, 2019, 11:59 a.m.