Trendboard is a web-based dashboard that analyzes trends in data from social media APIs.
The current version of Trendboard can be viewed and tested here.
The webapp is split into two sections with different features:
- Analyze various data about currently trending Youtube videos using different plots.
- Display the most commonly tagged topics in Youtube trends.
- Search for a topic or hashtag and get the average sentiment of recent tweets with that label.
- Display the top trending twitter topics and hashtags by country.
- ML Model
- The sentiment classifier model training was done on 1.6 million tweets from kaggle and the process can be seen in the twitter_sentiment_analysis_model.ipynb file under the assets folder.
- The final model and preprocessor is saved in the utilities folder
If you wish to run the project locally take the following steps:
-
Clone the repository.
-
Create the necessary API keys:
-
Under the main folder path create a file named
.env
and insert the API keys in the following format:
YOUTUBEAPIKEY = '<insert youtube api key here>'
TWITTERAPIKEY = '<insert twitter api key here'
TWITTERAPISECRETKEY = '<insert twitter secret key here>'
- Download the necessary packages using
pip install
orconda install
if using an Anaconda environment (recommended). - Run
index.py
!
Note: If getting errors related to the TextCleaner or finalTwitterModel, try deleting
finalTwitterModel.pkl
and rerunning model_save.py (this may take some time depending on hardware).