plot.tweets: Plots number of tweets by hour or minute

Description Usage Arguments Author(s) Examples

Description

Plots number of tweets by hour or minute

Usage

1
2
3
## S3 method for class 'tweets'
plot(tweets, breaks = "hours", return_plot = FALSE,
  missing_minutes = FALSE, hours = 0)

Arguments

tweets

object of class tweets

breaks

either "minutes" or "hours"

return_plot

If TRUE, function returns plot as an object (useful when saving to a file.)

missing_minutes

If TRUE, minutes with zero tweets in the plot where breaks is minutes will be interpolated.

hours

numeric. When different from zero, will add that number of hours to the timestamp of the tweets. That is, when hours is zero, then all times are expressed in NY time.

Author(s)

Pablo Barbera pablo.barbera@nyu.edu, Megan Metzger megan.metzger@nyu.edu

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 
## connect to the Mongo database
 mongo <- mongo.create("SMAPP_HOST:PORT", db="DATABASE")
 mongo.authenticate(mongo, username="USERNAME", password="PASSWORD", db="DATABASE")
 set <- "DATABASE.COLLECTION"

## extract all tweets that mention 'occupygezi' and do a quick plot
 tweets <- extract.tweets(set, string="occupygezi", fields="created_at")
 plot(tweets)

## End(Not run)

SMAPPNYU/smappR documentation built on May 9, 2019, 11:19 a.m.