get_twitter_chart: Chart Twitter Tweet Activity

Description Usage Arguments Details Value Examples

Description

This function *does* require you to be authenticated. Follow directions from ?twitter_setup (construct a ~/.twitter file with OAuth credentials). The search is performed using userTimeline which has a rate limit maximum of 3200 Tweets. Allowances are made for this liimt.

Usage

1
2
get_twitter_chart(user = NULL, loadSaved = NULL, addNumbers = TRUE,
  showPlot = TRUE)

Arguments

user

Twitter user (handle)

loadSaved

if provided, a saved output from this function for which to repeat evaluation

addNumbers

logical. Should number of Tweets be overlayed?

showPlot

logical. Should the plot be displayed? Otherwise ggplot2 object is just returned.

Details

As per the API https://dev.twitter.com/rest/reference/get/statuses/user_timeline, "[sic] Native retweets of other statuses by the user is included in this total, regardless of whether include_rts is set to false when requesting this resource." so this is unavoidable behaviour.

This function utilises both theme_github and scale_fill_social and is subject to updates to those functions.

Value

a list containing the ggplot object and data object:

list(plot = <ggplot2 object>, data = <data.frame>)

Examples

1
2
3
## Not run: 
get_twitter_chart("carroll_jono")
## End(Not run)

jonocarroll/butteRfly documentation built on May 19, 2019, 7:31 p.m.