Description Usage Arguments Examples
This function scrapes twitter for your chosen phrase, and outputs a summary of the most positive or negative tweets
1 2 3 | hash_sentiment(regex = "coriander|cilantro", num.tweets = 800,
method = "afinn", sentiment = "positive", num.summary = 6,
scrape = TRUE)
|
regex |
Regular expression for the words/phrase you are interested in. Twitter will be scraped for this regex. |
num.tweets |
How many tweets should be fetched? Currently, only the latest tweets can be scraped. |
method |
Sentiment Analysis method. Options include "nrc" which assigns words to 8 emotions and 2 sentiments or "afinn" which assigns a positive numeric score to positive words and negative scores to negative words. Only 'afinn' works right now. |
sentiment |
Choose between "positive" or "negative" sentiment summary |
num.summary |
The number of tweets to be summarised from the 'most positive' or 'most negative' list |
1 2 3 | hash_sentiment(regex = "coriander|cilantro", num.tweets = 200,
method = "afinn", sentiment = "positive",
num.summary = 6)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.