Dash と Plotly で作るダッシュボード
Alex Scriven
Data Scientist
完全な Dash アプリ:
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 はアプリを初期化 dcc はグラフや入力などの UI コンポーネント
app = Dash()app.layout = [dcc.Graph( id='example-graph', figure=bar_fig)]
Dash() でアプリオブジェクトを作成app.layout を設定dcc.Graph() を使用figure = 表示する Plotly 図id = 後でコールバックに必須
if __name__ == '__main__':
app.run(debug=True)
python my_app.pydebug はテスト時のフィードバック用
Google Chrome などのブラウザでアクセス
サーバー起動中に .py を更新・保存するとブラウザが即時反映



Dash と Plotly で作るダッシュボード