https://www.highcharts.com/
Interactive JavaScript charts for your webpage | Highcharts
"I absolutely LOVE Highcharts & maps, very cool! We use it for a web metrics dashboard, which is shared with internal marketing stakeholders. The tool is brilliant and the API documentation is super-helpful. I set up some basic, manual reports using Highch
www.highcharts.com
Flask์ ์ค์๊ฐ ๊ทธ๋ํ๋ฅผ ๊ตฌํํด๋ณด๊ณ ์ถ์ด์, Highcahrts๋ผ๋ ํ๋ ์์ํฌ๋ฅผ ์ฌ์ฉํ์ต๋๋ค.
*ํ์ผ ๊ตฌ์ฑ
app.py (Flask run server ํ์ผ)
csv-to-sqlite.py (csv๋ฅผ sqlite DB์ ์ ์ฅํ )
db.sqlite(DBํ์ผ)
data.csv(์๊ฐํํ ๋ฐ์ดํฐ๊ฐ ๋ค์ด์๋ ํ์ผ)
graph.html(htmlํ์ผ)
static ํ์ผ๋ค(๊ทธ๋ํ๋ฅผ ๊ตฌํํด์ค JS ํ์ผ)
* CSV ํ์ผ ์์ฑํ๊ธฐ.
์
๋ ฅํ ๋ฐ์ดํฐ๊ฐ ๋ค์ด์๋ ํ์ผ์
๋๋ค. [timestamp , value] ๋๊ฐ์ง ์ด(column)๋ก ๊ตฌ์ฑ๋ฉ๋๋ค.
*CSV ๋ฐ์ดํฐ sqlite DB์ ์ ์ฅํ๊ธฐ.
์ด์ ๊ทธ๋ํ๋ฅผ ๋ง๋ค ๋ฐ์ดํฐ๋ฅผ SQLite์ ์ ์ฅํ์ต๋๋ค. ์ฌ๊ธฐ๊น์ง ์ ๋์๋์ง DBํ์ผ์ ํ๋ฒ ํ์ธํด๋ณด๊ฒ ์ต๋๋ค.
์ ๋ค์ด๊ฐ์ต๋๋ค.
*HTMLํ์ผ
*app.py ํ์ผ
*Static ํ์ผ๋ค
https://www.fontenay-ronan.fr/dynamic-charts-with-highcharts-sqlite-and-python/
Dynamic charts with Highcharts, SQLite and Python โ Ronan's blog
I used to use a Raspberry Pi as a data logger for many sensors, here is how I create a nice front-end for data visualization. - Store data : SQLite - Serve content : Python with Flask - Plot data : Hightcharts / Highstock 1 Database 1.1 Create database A q
www.fontenay-ronan.fr
(์ฐธ๊ณ ํ ๋ธ๋ก๊ทธ์
๋๋ค.)