/GaryVeeTweets

Sentiment Analysis of Gary Vee's Tweets

Primary LanguageJupyter Notebook

GaryVeeTweets

WorldCloud and Sentiment Analysis of Gary Vee's Tweets in Python. The tweets scraped were from January 1st 2020 until January 12th 2021.

Frameworks

  • PIL - Image processing library
  • Pandas - DataFrame Library
  • Numpy - Mathematical Library
  • Matplotlib - Library used for visualizations
  • Wordcloud - Library used for making wordclouds
  • NLTK - NLP Library
  • Snscrape - Scraper for Social networks services

Installation

Using python's package manager pip to install the dependencies

pip install pandas
pip install PIL
pip install matplotlib
pip install wordcloud
pip install git+https://github.com/JustAnotherArchivist/snscrape.git

Python 3.8 or higher is required for snscrape

How to run

Using snscrape to scrape the tweets from Twitter.

Execute the following command on the terminal

snscrape --jsonl --progress --since 2020-01-01 twitter-search "from:garyvee" > Gary_data.json

--jsonl: Saves as a Json file

--progress: Displays progress every 100 tweets scraped

--since: The time from when the tweets should be scraped

--twitter-search: twitter keyword to search from

The result tweets are saved as the Gary_data.json file.

The GaryVeeWC.ipynb contains the code and outputs for WorldCloud and Senitment Analysis. It should be executed in either Jupyter Notebooks or Google Collab.