Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

💬 Sentiment Analysis Dashboard

A Streamlit-based Sentiment Analysis Dashboard that analyzes text data from CSV files, classifies sentiment as Positive, Neutral, or Negative, and visualizes results using interactive charts.

Users can upload datasets, filter by sentiment, and download processed results for further analysis.


🚀 Project Overview

This dashboard allows users to:

  • 📂 Upload CSV files containing text data
  • 🧹 Automatically clean and preprocess text
  • 😊 Classify sentiment using NLP
  • 📊 Visualize sentiment distribution (Bar, Pie, Line charts)
  • 🔍 Filter rows by sentiment
  • 📥 Download filtered results

The application is built using Streamlit, TextBlob, and Matplotlib.


🧠 Features

✅ Automatic Text Column Detection

  • Detects all text (object-type) columns
  • Merges multiple text columns into a single analyzable field

✅ Text Preprocessing

  • Converts text to lowercase
  • Removes URLs, mentions, hashtags
  • Removes punctuation and numbers
  • Eliminates extra whitespace

✅ Sentiment Classification

  • Uses TextBlob polarity score
  • Classifies as:
    • Positive (polarity > 0)
    • Neutral (polarity = 0)
    • Negative (polarity < 0)

✅ Interactive Dashboard

  • Summary metrics (Total, Positive, Neutral, Negative)
  • Bar chart visualization
  • Pie chart distribution
  • Line graph (Sentiment Count)
  • Sentiment filtering
  • CSV download option

🛠 Tech Stack

  • Python
  • Streamlit
  • Pandas
  • TextBlob
  • Matplotlib
  • Regex (re)

📂 Project Structure

sentiment_dashboard/ │ ├── app.py # Main Streamlit application ├── requirements.txt # Project dependencies └── README.md


⚙️ Installation & Setup

1️⃣ Clone the Repository

git clone <your-repository-link>
cd sentiment_dashboard
2️⃣ Install Dependencies
pip install -r requirements.txt
3️⃣ Run the Application
streamlit run app.py

The dashboard will open in your browser at:

http://localhost:8501
📊 How It Works

Upload a CSV file containing text data.

The system:

Detects text columns

Cleans and preprocesses text

Computes sentiment polarity

Displays:

Summary metrics

Visual charts

Filtered data view

Download processed dataset if needed.
Example Visualizations

Sentiment Distribution (Bar Chart)

Sentiment Percentage (Pie Chart)

Sentiment Count (Line Graph)
Key Learning Outcomes

Text preprocessing using regex

Sentiment analysis using TextBlob

Data manipulation with Pandas

Interactive dashboard development using Streamlit

Data visualization using Matplotlib

CSV file handling and dynamic filtering

🚀 Future Enhancements

Add VADER sentiment model for comparison

Support real-time Twitter/YouTube comment analysis

Add word cloud visualization

Deploy on Streamlit Cloud or AWS

Add authentication and user-based uploads

About

A Streamlit Sentiment Analysis Dashboard that analyzes text data from CSV files, classifies it as Positive, Neutral, or Negative, and visualizes the results with interactive charts. Users can filter by sentiment and download the processed data for further use.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages