Twitter Sentiment Analysis Data

Twitter Sentiment Analysis Data

Citation Author(s):
Rabindra
Lamsal
JNU, New Delhi
Submitted by:
Rabindra Lamsal
Last updated:
Thu, 01/02/2020 - 09:35
DOI:
10.21227/t4mp-ce93
Data Format:
Links:
License:
Dataset Views:
3712
Share / Embed Cite
Abstract: 

Each database (*.db) contain three columns. First column: date and time of the tweet, second column: tweet, third column: sentiment score for the particular tweet within the range [-1,1] with -1 being the most negative, 0 being the neutral and +1 being the most positive sentiment.

The tweets have been collected by the LSTM model deployed here at sentiment.live [1]. The last column, viz. sentiment score, is not the score estimated by the model. The LSTM model is still in the pre-alpha phase. Therefore, to make it easy for the NLP researchers to get access to the sentiment analysis of each collected tweet, the sentiment score out of TextBlob [2] has been appended as the last column. The sentiment scores produced by our model will be made public after the project is completely open-sourced.

 ####status/latest addition: Dec 29, 2019####

Tweets containing the term "facebook": 0.77 million-plus

Tweets containing the term "android": 0.88 million-plus

Tweets containing the term "oneplus": 15 thousand-plus

Tweets containing the term "messi": 225 thousand-plus

Tweets containing the term "housefull 4": 346 thousand-plus

Tweets containing the term "the joker": 1 million-plus

Tweets containing the term "iphone 11": 2 million-plus

##################

References:

[1] https://sentiment.live/   [2] https://textblob.readthedocs.io/en/dev/

Instructions: 

The .db files are SQLite files. The procedure of working with them is just as handling normal SQLite files.

Below is an illustration of how a connection can be made to the SQLite database, fetch the whole database as a pandas data frame and work on the data frame. 

conn = sqlite3.connect('/path/to/file.db')

c = conn.cursor()

df_pie = pd.read_sql("SELECT * FROM sentiment", conn)

total_tweets = df_pie.shape[0]

p_tweets = df_pie.apply(lambda x: True if x['sentiment'] > 0 else False , axis=1)

positive_tweets = len(p_tweets[p_tweets == True].index)

n_tweets = df_pie.apply(lambda x: True if x['sentiment'] < 0 else False , axis=1)

negative_tweets = len(n_tweets[n_tweets == True].index)

neutral_tweets = total_tweets - positive_tweets - negative_tweets 

Comments

Downloading dataset 

You're very much welcome. Will be adding some more SQLite databases the next week.

Dataset Files

You must be an IEEE Dataport Subscriber to access these files. Login or subscribe now. Sign up to be a Beta Tester and receive a coupon code for a free subscription to IEEE DataPort!

Embed this dataset on another website

Copy and paste the HTML code below to embed your dataset:

Share via email or social media

Click the buttons below:

facebooktwittermailshare
[1] Rabindra Lamsal, "Twitter Sentiment Analysis Data", IEEE Dataport, 2019. [Online]. Available: http://dx.doi.org/10.21227/t4mp-ce93. Accessed: Jan. 21, 2020.
@data{t4mp-ce93-19,
doi = {10.21227/t4mp-ce93},
url = {http://dx.doi.org/10.21227/t4mp-ce93},
author = {Rabindra Lamsal },
publisher = {IEEE Dataport},
title = {Twitter Sentiment Analysis Data},
year = {2019} }
TY - DATA
T1 - Twitter Sentiment Analysis Data
AU - Rabindra Lamsal
PY - 2019
PB - IEEE Dataport
UR - 10.21227/t4mp-ce93
ER -
Rabindra Lamsal. (2019). Twitter Sentiment Analysis Data. IEEE Dataport. http://dx.doi.org/10.21227/t4mp-ce93
Rabindra Lamsal, 2019. Twitter Sentiment Analysis Data. Available at: http://dx.doi.org/10.21227/t4mp-ce93.
Rabindra Lamsal. (2019). "Twitter Sentiment Analysis Data." Web.
1. Rabindra Lamsal. Twitter Sentiment Analysis Data [Internet]. IEEE Dataport; 2019. Available from : http://dx.doi.org/10.21227/t4mp-ce93
Rabindra Lamsal. "Twitter Sentiment Analysis Data." doi: 10.21227/t4mp-ce93