full app using Dash and tweepy
This app is adapted from excellent tutorials from Eric kleppen here:
- Dashboards in Python for Beginners and Everyone Else using Dash
- Dashboards in Python: 3 Advanced Examples for Dash Beginners and Everyone Else
- Dashboards in Python for Beginners using Dash — Live Updates and Streaming Data into a Dashboard
The initial code can be found here and has been augmented based on the above papers.
Replicate the below structure
the following modules will be specifically required
- dash (for the dashboard)
- plotly (to visualize data within the interactive dashboard)
- tweepy (to stream live tweets)
- sqlite3 (for the kaggle wine database)
A twitter dev account is necessary and a twitter API app should be created. The credentials should be used and stored in the config.py file.
Finally the wine database can be found on the author's github winapp repository (link above).
The streaming program and the dash application must be run in parallel. The streaming app should be run in one instance python tweepystream.py
then the dash app should be run in another instance python index.py
.
This will allow to have livefeed tweet update in the dash app.