Twitter Sentiment Analysis Data

Twitter Sentiment Analysis Data

Citation Author(s):
JNU, New Delhi
Submitted by:
Rabindra Lamsal
Last updated:
Fri, 05/01/2020 - 08:55
Data Format:
Dataset Views:
0 ratings - Please login to submit your rating.
Share / Embed Cite

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 model deployed here at [1]. The last column, viz. sentiment score, is not the score estimated by the model. The 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. Note: This project was designed as a part of the major project (disaster response system) to understand the optimization of VMs and databases for efficient classification of social media messages.

If you're looking for geolocation-based COVID-19 sentiment data:


[1]   [2]


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 


Downloading dataset 

Submitted by Ananth Vishnu B... on Tue, 12/10/2019 - 18:35

You're very much welcome.

Submitted by Rabindra Lamsal on Sat, 03/28/2020 - 13:54

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!

Thank you for rating this dataset!

Please share additional details of your rating with the IEEE DataPort community by adding a comment.

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:

[1] Rabindra Lamsal, "Twitter Sentiment Analysis Data", IEEE Dataport, 2019. [Online]. Available: Accessed: Jun. 03, 2020.
doi = {10.21227/t4mp-ce93},
url = {},
author = {Rabindra Lamsal },
publisher = {IEEE Dataport},
title = {Twitter Sentiment Analysis Data},
year = {2019} }
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.
Rabindra Lamsal, 2019. Twitter Sentiment Analysis Data. Available at:
Rabindra Lamsal. (2019). "Twitter Sentiment Analysis Data." Web.
1. Rabindra Lamsal. Twitter Sentiment Analysis Data [Internet]. IEEE Dataport; 2019. Available from :
Rabindra Lamsal. "Twitter Sentiment Analysis Data." doi: 10.21227/t4mp-ce93