top of page

Python code scrape Twitter sentiment for NBA teams

  • Writer: Park Daniel
    Park Daniel
  • Jun 6, 2023
  • 1 min read


ree

  • We can perform sentiment analysis on each team using the imported module tweepy which allows us to access Twitter API and divide each tweet based on if they are positive or negative



ree

  • This is an example of analysis sentiment for the Lakers, Warriors, Celtics, Bucks, and Rockets

  • It retrieves recent tweets mentioning team's name

  • After it calculates percentage of positive and negative sentiment using TextBlob library

Comments


Drop Me a Line, Let Me Know What You Think

Thanks for submitting!

© 2023 by Train of Thoughts. Proudly created with Wix.com

bottom of page