Overview:
In this project we concentrated on topics such as:- Which topic is trending,
- Tweets relating a hash tag
We can use this data in many ways for example:
- Finding trends related to a specific keyword
- To gauge brand sentiments.
- To collect feedback of new brands, products and their services.
Tools Needed:
We used Python programming language. The following tools and packages are must in order to accomplish this project.
- Python 2.7
- Packages : pip, pandas, Tweepy, matplotlib, jupyter
- Jupyter Notebook
- Access tokens with which twitter gives permission to access their API.
Connecting to twitter API:
Twitter requires all requests to use OAuth for authentication. We will assign the keys to their respective variables for use, and also connect to the Twitter API using "tweepy". The commands are shown below:
consumer_key = '<Your Consumer Key>' consumer_secret = '<Your Consumer secret Key>' access_token = '<Your Access Token>' access_token_secret = '<Your Access Token Secret>'auth = tweepy.OAuthHandler(consumer_key, consumer_secret) auth.set_access_token(access_token, access_token_secret) api = tweepy.API(auth)
Finding Trends:
Downloading the data in the trend that we chose:
Data Manipulation:
consumer_key = '<Your Consumer Key>' consumer_secret = '<Your Consumer secret Key>' access_token = '<Your Access Token>' access_token_secret = '<Your Access Token Secret>'auth = tweepy.OAuthHandler(consumer_key, consumer_secret) auth.set_access_token(access_token, access_token_secret) api = tweepy.API(auth)
Finding Trends:
Downloading the data in the trend that we chose:
Data Manipulation: