Skip to content

chiragkakad/reddit-sentiment-analyzer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📊 Reddit Sentiment Analyzer

A Streamlit web app that analyzes the sentiment of top Reddit posts for any subreddit and time frame.
It uses NLTK's VADER Sentiment Analyzer to score posts and displays visual insights,.

✨ Features

  • Fetches top Reddit posts for a selected time range (day, week, month, year, all).
  • Calculates average sentiment score.
  • Displays sentiment distribution chart.
  • Shows Top 5 Positive and Top 5 Negative posts.
  • Allows downloading results as CSV.

🚀 How to Run

  1. Clone the repository:
    git clone https://github.com/chiragkakad/reddit-sentiment-analyzer.git
    cd reddit-sentiment-analyzer

2. Install dependencies:

   ```bash
   pip install -r requirements.txt
  1. Set up environment variables in .env:

    REDDIT_CLIENT_ID=your_client_id
    REDDIT_CLIENT_SECRET=your_client_secret
    REDDIT_USER_AGENT=your_user_agent
    
  2. Run the app:

    streamlit run app.py
  3. Open the provided local URL in your browser.

🛠 Tech Stack

  • Python (NLTK, pandas, matplotlib)
  • Streamlit for the web interface
  • PRAW for Reddit API

About

A Streamlit web app that analyzes the sentiment of top Reddit posts for any subreddit and time frame.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages