1.渲染圖表
2.Pyechars視覺化圖表
3.pyecharts integration with django
4.Pyecharts 生成图表(附Django支持)
5.【python 視覺化】pyecharts + Django 使用指南
6.DJANGO 使用 可视化包-PYECHART
「智慧生活科技專業社群」由 Nantou.py 使用者社群與國立虎尾科技大學電機資訊學院共同維護,匯集關注Python、人工智慧、物聯網與智慧生活應用的教師、學生及實務工作者。本社群以「科技融入生活、教學連結場域、知識促進共好」為核心,分享Python程式設計、AI協作學習、AIoT、網際網路與雲端服務、智慧農業、福祉科技、永續發展及USR社會實踐等內容,並將技術導入課堂、社區與真實生活場域。部分文章運用生成式AI協助資料整理、內容架構、程式範例與文字潤飾,文章主題、場域經驗、內容查核及最終修訂則由作者與社群成員負責。我們期待透過人與AI協作,讓科技成為改善生活、連結世代、支持地方與實踐永續的力量。
2019年3月26日 星期二
2019年3月10日 星期日
用Python Dash來設計展示用的儀錶板
對於大數據而言,如何用儀錶板來展示資料是很重要的,經由圖表的展現比從大量的數據中,找出關鏈問題做出決策要容易多。本節將介紹如何運用Python語言特質,使用Dash用圖表來展示結果。
參考資料來源:
1. Dash Layout,網址:https://dash.plot.ly/getting-started
2.Create Reactive Web Apps in pure Python,網址:https://medium.com/@plotlygraphs/introducing-dash-5ecf7191b503
3.Plotly Python Open Source Graphing Library
實際測試上述兩個網站所提供的三支程式,使用Python app.py,執行,app.py是指應用程式的名稱,也就是從上述網站中所提供的原始碼來進行測試,然後使用http://127.0.0.1:8050/查看執行結果。
(1) 長條圖
(三) 地圖顯示
參考資料來源:
1. Dash Layout,網址:https://dash.plot.ly/getting-started
2.Create Reactive Web Apps in pure Python,網址:https://medium.com/@plotlygraphs/introducing-dash-5ecf7191b503
3.Plotly Python Open Source Graphing Library
實際測試上述兩個網站所提供的三支程式,使用Python app.py,執行,app.py是指應用程式的名稱,也就是從上述網站中所提供的原始碼來進行測試,然後使用http://127.0.0.1:8050/查看執行結果。
(1) 長條圖
(二) 趨勢圖
(三) 地圖顯示
2019年3月3日 星期日
使用Git+Bitbucket+Python+Django+Heroku來管理和發展網站
本篇將介紹用Git來做版本控制,用Bitbucket來儲存原始碼,使用Python來撰寫程式,Django來發展網站的框架,最後使用Heroku來發布網站。
1.使用Bitbucket來增加一個repository
3.檢查檔案是否己經上傳成功
有關佈署到Heroku請參考文章"用 Heroku 部署網站"
1.使用Bitbucket來增加一個repository
2.按下列輸入指令
3.檢查檔案是否己經上傳成功
有關佈署到Heroku請參考文章"用 Heroku 部署網站"
2019年3月1日 星期五
使用Python+Django架構網站
為何要選用Django可以從下面影片中來瞭解。
中文Django教材可以參考文章"Django Tutorial"。
在Django Project教材中,僅提到三個指令
在"Django Template"文章中,有關datetime.now()使用的程式要改成下列(黃色顏色是補上的程式):
from django.shortcuts import render
import datetime
def now(request):
return render(request, "now.html", {'now': datetime.datetime.now()})
對於"Django Views, Django URL & Django Template 再訪"的文章,view.py的程式應該為:
from django.shortcuts import render
from django.http import HttpResponse
import datetime
from .models import Article
def home(request):
s = "Hello World!"
return HttpResponse(s)
def now(request):
return render(request, "now.html", {'now': datetime.datetime.now()})
def article_detail(request, pk):
article = Article.objects.get(pk=pk)
return render(request, 'article_detail.html', {'article': article})
另外
url(r'article//', article_detail),
也應該是path(r'article//', article_detail),
在部署的文件" 把你的 Django Project 丟上雲端", heroku run python manage.my migrate,其中manage.my 要改成manage.py。
中文Django教材可以參考文章"Django Tutorial"。
在Django Project教材中,僅提到三個指令
- pipenv run django-admin startproject blog
- cd blog
- pipenv run python manage.py runserver
經敏哥測試還需要加上建立虛擬環境以及安裝Django,變成下列:
- pipenv run django-admin startproject blog
- cd blog
- mkvirtualenv blog
- pip install django
- pipenv run python manage.py runserver
在"Django Template"文章中,有關datetime.now()使用的程式要改成下列(黃色顏色是補上的程式):
from django.shortcuts import render
import datetime
def now(request):
return render(request, "now.html", {'now': datetime.datetime.now()})
對於"Django Views, Django URL & Django Template 再訪"的文章,view.py的程式應該為:
from django.shortcuts import render
from django.http import HttpResponse
import datetime
from .models import Article
def home(request):
s = "Hello World!"
return HttpResponse(s)
def now(request):
return render(request, "now.html", {'now': datetime.datetime.now()})
def article_detail(request, pk):
article = Article.objects.get(pk=pk)
return render(request, 'article_detail.html', {'article': article})
另外
url(r'article/
也應該是path(r'article/
訂閱:
文章 (Atom)








