用了 Dash 當作 front-end
這是 Dash 介紹
Written on top of Flask, Plotly.js, and React.js, Dash is ideal for building data visualization apps with highly custom user interfaces in pure Python. It's particularly suited for anyone who works with data in Python
Written on top of Flask, Plotly.js, and React.js, Dash is ideal for building data visualization apps with highly custom user interfaces in pure Python. It's particularly suited for anyone who works with data in Python
整個架構需要寫一個 app.py
可以包含 plot graph 還有 html layout.
比較進階的寫法是 live updating components
這個 feature 可以設個 interval
讓網站在一個時間內自動update
這裡是簡單的example, 提供兩種寫 graph 的方法
https://gist.github.com/boalinlai/7da3aac5a73cd45e046c88bdaae016cf
這個 feature 可以設個 interval
讓網站在一個時間內自動update
這裡是簡單的example, 提供兩種寫 graph 的方法
https://gist.github.com/boalinlai/7da3aac5a73cd45e046c88bdaae016cf
layout 裡面用 id 去指定function
call back function 裡面要有 data, layout
然後設置一個 time interval
最後
指定完 host 還有 port 之後
sudo python app.py
No comments:
Post a Comment