This app, searches Reddit for the number of time a stock symbol is found, creating a value called 'Reddit Heat Index' for the current (as of 01/20/2021) S&P 500 Index stocks. The values are displayed on a daily (UTC based) heatmap, for stocks with at least one Reddit search hit.
See a live version of the app deployed to Heroku
Note due to the free tier database limitations, the live demo is rather limited.- Live demo no longer functions due to Heroku dropping free tier.
- See requirements.txt for required Python modules
- Use pip install -r requirements.txt - for a quick install of all modules
- PostgresSQL installed and configured on system
- Create a database called 'reddit_heat' OR update app.py with the database name you've used.
- Create a database called 'reddit_heat_test' if you want to run the tests OR update test_sql_models.py with the database name you've used.
- Obtain Reddit API access.
- Configure example_secret.py (in Settings Dir) as required
- Rename example_secret.py to secret.py
- To view sample seed data run the file sql_seed.py and start the flask app (flask run) you will have a working app with seed data.
- To update/fetch live data run heat_updater.py. It will search Reddit for the stock symbols in the four default tracked subreddits. The search should take about 20 minutes to finish. The script will update the database as it runs. As soon as any data is found, it is updated and viewable on the web front end.