Skip to content

cam-cc/NFL-sentiment-analysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🏈 NFL Sentiment Analysis

Python RoBERTa License: MIT

A sophisticated machine learning project that performs real-time sentiment analysis on NFL-related social media content using the RoBERTa pre-trained model. The analysis provides valuable insights into public sentiment towards NFL teams during the active season.

📊 View Dataset on Kaggle 📝 Read the Article on Medium

🌟 Key Features

  • Real-time social media data collection for NFL teams
  • Context-aware sentiment analysis using RoBERTa
  • Intelligent parsing of NFL-specific scenarios:
    • Draft pick implications
    • Injury impact assessment
    • Team performance metrics
  • Automated data export and visualization
  • Season-specific context optimization

📊 Examples

NFL Sentiment Analysis Dashboard

Model Context Intelligence

The model has been specifically trained to understand NFL-specific contexts:

  • Negative sentiment for season-ending injuries
  • Draft position implications during active season
  • Team performance trends and playoff implications

🚀 Getting Started

Prerequisites

  • Python 3.8+
  • pip package manager
  • Git

Installation

  1. Clone the repository:
git clone https://github.com/cam-cc/NFL-sentiment-analysis.git
cd NFL-sentiment-analysis
  1. Install dependencies:
pip install -r requirements.txt

💻 Usage

  1. Configure your settings:
# create a .env
TWITTER_USERNAME=Username
TWITTER_PASSWORD=Password
  1. Run the analysis: FROM ROOT DIR
python ./src/main.py
  1. Test custom inputs:
python ./tests/test-roberta.py

Data will be exported to data/TEAM_TIMESTAMP.csv

📈 Model Testing

To test the sentiment analysis on custom text:

  1. Open test-roberta.py
  2. Modify the sample text
  3. Run the script
  4. View the comprehensive sentiment analysis output

🤝 Contributing

We welcome contributions! Here's how you can help:

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

📝 License

This project is licensed under the MIT License - see the LICENSE file for details.

✨ Acknowledgments

  • RoBERTa model developers
  • Twitter I guess

⚠️ Note

This model is optimized for in-season analysis. Performance may vary during the off-season due to different contextual indicators.

About

An ML pipeline leveraging a fine-tuned RoBERTa model to analyze NFL fan sentiment from Twitter. Includes custom web scraper, real-time analysis, and growing dataset updated monthly on Kaggle.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages