The purpose of this project is to Scrape Twitter Data and Visualise the trend, topics and the sentiment, which is helpful in predicting the perception of the general public on some event/commodity.
- Twitter Scraping
- Data Visualisation - WordCloud, Topic Modelling
- Sentiment Analysis
- Natural Language Processing
- Python
- Python-Twitter API
- sklearn
- Pandas, jupyter
- matplotlib
- nltk
The cause and effect relationship between impactful news and martket movements can be directly observed during the release of big news/event.eg Even a single Tweet from Trump on oil can cause massive price variations. News information can give the true nature of the market for any topic.
Python-twitter API helps us to scrape the tweets. Tweets can be collected through a search keyword or from specific accounts. With the actual text, we can also get information on number of likes and re-tweet count.
Sample Tweets Format:
- WordCloud - It is a visual representation of text data. It displays a list of words, the importance of each beeing shown with different font sizes or colors. It is useful for quickly perceiving the most prominent terms in the corpus.
-
Topic Modelling - It is a method of Unsupervised Classification of documents, similar to clustering on numerical data, which finds natural groups of items (topics).
-
Sentiment Analysis - Sentiment analysis is the automated process of analyzing text data and sorting it into sentiments : positive, negative, or neutral. Using sentiment analysis tools to analyze opinions in Twitter data can help understand how people are talking about certain topics. With more than 321 million active users, sending a daily average of 500 million Tweets, Monitoring Twitter can allow one to understand their audience, keep on top of what’s being said, and discover new trends in the industry.
Sample Sentiment Analysis:
Step 1: Go to Twitter Developers and sign in with your account
Step 3: Once the app is created, go to the Keys and Tokens sections, copy your API keys and generate Tokens
Step 4: Download requirements.txt and install on terminal:
pip install -r requirements.txt