Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🗳️ Political Tweet Sentiment Analysis using NLP

An NLP-based sentiment analysis project that analyzes tweets related to political leaders using Python and TextBlob. The project classifies tweets into positive and negative sentiments and visualizes the results using interactive Plotly charts and Word Clouds.


📌 Features

  • Data Cleaning & Preprocessing
  • Sentiment Analysis using TextBlob
  • Positive & Negative Tweet Classification
  • Interactive Plotly Visualizations
  • Top 20 Frequent Words Analysis
  • Separate Word Clouds for Modi and Rahul Tweets
  • Comparative Sentiment Analysis

📊 Visualizations

  • 📈 Sentiment Comparison Bar Chart
  • 🥧 Sentiment Distribution Pie Chart
  • 📊 Sentiment Percentage Comparison
  • 🌞 Sunburst Chart
  • 🌳 Treemap
  • 📦 Box Plot
  • 🎻 Violin Plot
  • 📋 Top 20 Frequent Words
  • ☁️ Modi Tweets Word Cloud
  • ☁️ Rahul Tweets Word Cloud

🛠️ Technologies Used

  • Python
  • Pandas
  • NumPy
  • TextBlob
  • Plotly
  • Matplotlib
  • WordCloud
  • NLTK
  • Jupyter Notebook

📂 Project Structure

political-tweet-sentiment-analysis
│
├── Sentiment_Analysis.ipynb
├── README.md
├── requirements.txt
├── dataset/
├── screenshots/
└── .gitignore

🚀 Installation

Clone the repository

git clone https://github.com/YOUR_USERNAME/political-tweet-sentiment-analysis.git

Move inside the project

cd political-tweet-sentiment-analysis

Install dependencies

pip install -r requirements.txt

Run the notebook

jupyter notebook

📷 Screenshots

Sentiment Comparison

Top 20 Frequent Words

Modi Tweets Word Cloud

Rahul Tweets Word Cloud

Rahul Tweets Word Cloud

Sentiment Percentage Comparision

Popularity Comparision


📈 Future Improvements

  • Deep Learning based Sentiment Analysis
  • Transformer Models (BERT)
  • Live Twitter API Integration
  • Dashboard using Streamlit

⭐ If you like this project, don't forget to star the repository!

About

NLP-based sentiment analysis of political tweets using TextBlob, Plotly, and WordCloud for interactive data visualization.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages