View source: R/perspectivefunctions.R
perspective_rtweet | R Documentation |
Queries the Google Perspective API and returns a tibble of tweets and measures
perspective_rtweet(rtweet_df, api_key, QPS = 1, summary = TRUE)
rtweet_df |
A dataframe of tweets returned by rtweet or rtweetXtras |
api_key |
A Perspective API key. Required. |
QPS |
Queries per second allowed by the Perspective API for the api_key (default is 1) |
summary |
TRUE delivers a condensed response, removing non-essential columns. FALSE delivers original rtweet_df with additional columns for measures |
df <- rtweet::search_tweets("summer", n=200) perspective_df <- perspective_rtweet(df, api_key = YourAPIkeyhere, QPS = 1, summary = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.