跳到主要內容

發表文章

目前顯示的是有「長條圖」標籤的文章

利用 Bokeh + Python 速成網頁統計圖

最近剛好有需求在想要如何將透過 rest api get 回來的資料做成統計表 原本想從 Chrome plugin 找,不過似乎沒找到相關的工具 無意間發現這個 Bokeh 是個可以速成又簡單的工具 只要幾行 code ,就能畫出各種統計圖 <measurement> <server> 192.168.10.240 </server> <cpu> 0 </cpu> <memory> 75 </memory> </measurement> <measurement> <server> 192.168.10.131 </server> <cpu> 5 </cpu> <memory> 91 </memory> 原本透過 rest api get 的資料,在 Chrome 只能如上這樣顯示,看起來十分不清楚 經過處理後,可以直接輸出成 html ,並且顯示精美的統計圖 讓 web 前後端都沒碰過的我,也能夠方便的在 html 上產生這種統計圖 參考網址: Bokeh 官網 http://bokeh.pydata.org/en/latest/ Python 上前端!利用 Bokeh 與 Python 製作網頁互動視覺化 http://blog.infographics.tw/2016/04/interactive-visualization-with-bokeh-and-python/