Building Dashboards with Dash and Plotly
Alex Scriven
Data Scientist
A complete Dash app:
from dash import Dash, dcc
app = Dash()
app.layout = [dcc.Graph(id='example-graph', figure=bar_fig)]
if __name__ == '__main__':
app.run(debug=True)
print("f{my_variable}")
from dash import Dash, dcc
Dash initializes the app dcc has UI components like graphs and inputs
app = Dash()app.layout = [dcc.Graph( id='example-graph', figure=bar_fig)]
Dash()app.layoutdcc.Graph()figure = The Plotly figure to renderid = Important for callbacks later
if __name__ == '__main__':
app.run(debug=True)
python my_app.py in the command-linedebug for feedback when testing
Access via a web browser such as Google Chrome
While served, update and save .py file to see live updates in browser



Building Dashboards with Dash and Plotly