This project allows you to monitor sentiment on Twitter. By collecting tweets for a search query like $TSLA
and generating a sentiment score, you can plot the overall Twitter sentiment for various companies.
WARNING: Running this app can cost you upwards of 500$ per year!
Please set up budget alerts in your AWS account. The yearly cost of running this may exceed 500$ and I don't want any surprise bills for you.
- You need an AWS account.
- Create a DynamoDB table named
Tweets
or the name you set inconfig.dev.json
. - Create a stream from that table and enter the stream ARN in the
config.dev.json
. - Install Python3 and pip on your computer.
- Install Node on your computer.
- Install the serverless framework on your computer.
Create a Twitter app and generate OAuth 1 keys. Put those keys into the config.dev.json
. Don't commit that to your own repository!
Adjust further configuration as you like in the config file config.dev.json
.
- Run
pip install -r requirements.txt
to install all the necessary python requirements. - Run
npm install
to install all the necessary deployment tooling. - Run
sls deploy
to deploy the application.
The cron job runs every 10 minutes. Once the cron has triggered and the collector AND analyzer have finished, you can find the sentiment scored tweets in your table (Tweets
or whatever you called it).