coastatistics / aprp Goto Github PK
View Code? Open in Web Editor NEWA dashboard visualize daily agriculture product price and volumn in Taiwan.
License: MIT License
A dashboard visualize daily agriculture product price and volumn in Taiwan.
License: MIT License
品項 | 規格 | 日期 | 指標 | 業務單位 |
---|---|---|---|---|
紅羽土雞 | 北區 | 2014/5/22 | 價格 | 40-41 |
紅羽土雞 | 北區 | 2014/5/23 | 價格 | 40-41 |
紅羽土雞 | 北區 | 2014/5/24 | 價格 | 40-41 |
紅羽土雞 | 北區 | 2014/5/25 | 價格 | 40-41 |
紅羽土雞 | 北區 | 2014/5/29 | 價格 | 41-42 |
有交易但OpenData無資料,等待OpenData更新API
web | File "/app/apps/dailytrans/reports/dailyreport.py", line 250, in report
web | self.update_cattles(item, item.row)
web | File "/app/apps/dailytrans/reports/dailyreport.py", line 218, in update_cattles
web | last_week_avg_price = sum(last_week_price) / len(last_week_price)
web | ZeroDivisionError: division by zero
behavior
GET http://host/config.js?t=H8DA net::ERR_ABORTED 404 (Not Found)
GET http://host/lang/zh.js?t=H8DA net::ERR_ABORTED 404 (Not Found)
GET http://host/skins/moono-lisa/editor.css?t=H8DA net::ERR_ABORTED 404 (Not Found)
settings
STATIC_ROOT = os.path.join(BASE_DIR, "live-static-files", "static-root")
STATICFILES_STORAGE = 'whitenoise.django.GzipManifestStaticFilesStorage'
CKEDITOR_BASEPATH = "/static/ckeditor/ckeditor"
urlpatterns = [
url(r'^event/$', EventListCreateAPIView.as_view(), name='api_event_cr'),
url(r'^event/(?P<pk>\d+)/$', EventRetrieveUpdateDestroyAPIView.as_view(), name='api_event_rud'),
]
Request URL: http://host/events/api/event/1/
Request Method: PUT
Status Code: 405 Method Not Allowed
Remote Address: 125.227.27.200:80
Referrer Policy: no-referrer-when-downgrade
Allow: GET, HEAD, OPTIONS, TRACE
Content-Length: 1222
Content-Type: text/html
Date: Sun, 30 Sep 2018 12:29:11 GMT
Server: Microsoft-IIS/8.5
X-Powered-By: ASP.NET
需求
欄的部分是各年,列的部分是月平均
settings:
STATICFILES_DIRS = [
os.path.join(BASE_DIR, 'static')
]
STATIC_URL = '/static/'
STATIC_ROOT = os.path.join(BASE_DIR, "live-static-files", "static-root")
STATICFILES_STORAGE = 'whitenoise.django.GzipManifestStaticFilesStorage'
MEDIA_URL = "/media/"
MEDIA_ROOT = os.path.join(BASE_DIR, "live-static-files", "media-root")
ref:
evansd/whitenoise#32
需求
目前產銷事件簿只能單筆新增,希望未來可以批量輸入
需求
目前匯出的產銷事件簿圖片只會有價量圖及事件點
未來希望匯出的圖片可以在事件點上加上事件內容
需求
當產品休市時,目前是以無價量的方式顯示,未來希望特別顯示出當天為休市無交易
豬及羊的介面裡,有出現『批發』的文字都改成『拍賣』
規格豬規格
Example
以2018/10/31
為例
市場 | 交易量 | 含155公斤以上 |
---|---|---|
新北市 | 2388 | N |
宜蘭縣 | 382 | Y |
桃園市 | 2032 | N |
新竹縣 | 701 | Y |
苗栗縣 | 599 | Y |
台中市 | 1843 | N |
大安區 | 1131 | N |
彰化縣 | 1552 | N |
南投縣 | 885 | N |
雲林縣 | 2072 | N |
嘉義市 | 690 | N |
嘉義縣 | 737 | N |
臺南安南 | 953 | N |
臺南市 | 493 | N |
高雄市 | 718 | N |
高雄岡山 | 984 | N |
高雄鳳山 | 1364 | N |
高雄旗山 | 323 | N |
屏東縣 | 1356 | N |
台東縣 | 195 | N |
花蓮縣 | 319 | Y |
Fix commit
5a8f9a7
需求
日報表製作及主委院會參用圖由平台產出
需求
價格與前一日跳動超過1倍以上發出提醒通知
品項 | 規格 | 價格日期 | 價格 | 平台 | 差異 |
---|---|---|---|---|---|
白肉雞 | 2014/2/3 | 46.33 | 45.83 | 0.5 | |
白肉雞 | 2014/4/27 | 49.67 | 49.67 | ||
白肉雞 | 2014/10/8 | 50 | 50.5 | -0.5 | |
白肉雞 | 2014/10/24 | 49.67 | 49.17 | 0.5 | |
白肉雞 | 2014/10/25 | 49.67 | 49.17 | 0.5 | |
白肉雞 | 2015/4/30 | 49.67 | 49.67 | ||
白肉雞 | 2015/7/10 | 48.33 | 48 | 0.33 | |
白肉雞 | 2015/9/4 | 48 | 48.33 | -0.33 | |
白肉雞 | 2016/3/16 | 48 | 48 | ||
白肉雞 | 2016/5/31 | 48 | 48 | ||
白肉雞 | 2016/8/7 | 46.33 | 46.33 | ||
白肉雞 | 2017/6/14 | 45 | 45 | ||
白肉雞 | 2018/4/14 | 51.33 | 51.33 | ||
白肉雞 | 2018/4/15 | 51.33 | 51.33 | ||
白肉雞 | 2018/8/31 | 45.5 | 45 | 0.5 | |
紅羽土雞 | 北區 | 2014/4/27 | 70 | 70 | |
紅羽土雞 | 北區 | 2014/5/3 | 68.33 | 70 | -1.67 |
紅羽土雞 | 北區 | 2014/5/22 | 67.5 | 67.5 | |
紅羽土雞 | 北區 | 2014/5/23 | 67.5 | 67.5 | |
紅羽土雞 | 北區 | 2014/5/24 | 67.5 | 67.5 | |
紅羽土雞 | 北區 | 2014/5/25 | 67.5 | 67.5 | |
紅羽土雞 | 北區 | 2014/5/29 | 69.17 | 69.17 | |
紅羽土雞 | 北區 | 2014/7/23 | 58.33 | 60 | -1.67 |
紅羽土雞 | 北區 | 2014/12/23 | 88.33 | 90 | -1.67 |
紅羽土雞 | 北區 | 2015/1/26 | 85 | 85 | |
紅羽土雞 | 北區 | 2015/1/27 | 85 | 85 | |
紅羽土雞 | 北區 | 2015/1/30 | 81.67 | 80 | 1.67 |
紅羽土雞 | 北區 | 2015/2/18 | 70 | 70 | |
紅羽土雞 | 北區 | 2015/2/19 | 70 | 70 | |
紅羽土雞 | 北區 | 2015/2/20 | 70 | 70 | |
紅羽土雞 | 北區 | 2015/2/21 | 70 | 70 | |
紅羽土雞 | 北區 | 2015/2/22 | 70 | 70 | |
紅羽土雞 | 北區 | 2015/2/23 | 70 | 70 | |
紅羽土雞 | 北區 | 2015/3/30 | 75 | 76.67 | -1.67 |
紅羽土雞 | 北區 | 2015/4/23 | 75 | 73.33 | 1.67 |
紅羽土雞 | 北區 | 2015/4/30 | 71.67 | 71.67 | |
紅羽土雞 | 北區 | 2015/7/22 | 83.33 | 85 | -1.67 |
紅羽土雞 | 北區 | 2015/11/16 | 73.33 | 75 | -1.67 |
紅羽土雞 | 北區 | 2015/11/23 | 80 | 81.67 | -1.67 |
紅羽土雞 | 北區 | 2015/12/4 | 85 | 83.33 | 1.67 |
紅羽土雞 | 北區 | 2016/3/16 | 78.33 | 78.33 | |
紅羽土雞 | 北區 | 2016/5/31 | 78.33 | 78.33 | |
紅羽土雞 | 北區 | 2016/8/7 | 76.67 | 76.67 | |
紅羽土雞 | 北區 | 2017/6/14 | 60 | 60 | |
紅羽土雞 | 北區 | 2018/4/14 | 61.67 | 61.67 | |
紅羽土雞 | 北區 | 2018/4/15 | 61.67 | 61.67 | |
紅羽土雞 | 北區 | 2018/4/16 | 63.33 | 63.33 | |
雞蛋 | 大運輸-3 | 2017/6/14 | 37.5 | 37.50 | |
雞蛋 | 大運輸-3 | 2018/4/14 | 44.17 | 44.17 | |
雞蛋 | 大運輸-3 | 2018/4/15 | 44.17 | 44.17 |
behavior
Ajax template script loaded, JavaScript engine look at objects that not yet loaded by scriptLoader()
scripts = [
// CKEditor Plugins
"{% static 'ckeditor/ckeditor-init.js' %}",
"{% static 'ckeditor/ckeditor/ckeditor.js' %}",
// Masonry Plugins
"{% static 'vendor/js/masonry.pkgd.js' %}",
// SocialWall Plugins
"{% static 'js/socialwall.js' %}",
]
var pagefunction = function() {
// clears the variable if left blank
socialWallHelper.init();
};
scriptLoader(scripts, pagefunction);
fix
var pagefunction = function() {
if(window.socialWallHelper){
socialWallHelper.init();
}
};
平台漏抓資料
品項 | 規格 | 價格日期 | 價格 | 平台 | 差異 |
---|---|---|---|---|---|
白肉雞 | 2016/8/7 | 46.33 | 46.33 | ||
白肉雞 | 2018/4/14 | 51.33 | 51.33 | ||
白肉雞 | 2018/4/15 | 51.33 | 51.33 | ||
紅羽土雞 | 北區 | 2018/4/14 | 61.67 | 61.67 | |
紅羽土雞 | 北區 | 2018/4/15 | 61.67 | 61.67 | |
紅羽土雞 | 北區 | 2018/4/16 | 63.33 | 63.33 | |
雞蛋 | 大運輸-3 | 2018/4/14 | 44.17 | 44.17 | |
雞蛋 | 大運輸-3 | 2018/4/15 | 44.17 | 44.17 |
平台資料錯誤
品項 | 規格 | 價格日期 | 價格 | 平台 | 差異 |
---|---|---|---|---|---|
白肉雞 | 2014/10/8 | 50 | 50.5 | -0.5 |
OpenData漏抓資料,等待OpenData重抓資料
品項 | 規格 | 價格日期 | 價格 | 平台 | 差異 |
---|---|---|---|---|---|
白肉雞 | 2014/4/27 | 49.67 | 49.67 | ||
白肉雞 | 2015/4/30 | 49.67 | 49.67 | ||
白肉雞 | 2016/3/16 | 48 | 48 | ||
白肉雞 | 2016/5/31 | 48 | 48 | ||
白肉雞 | 2017/6/14 | 45 | 45 | ||
紅羽土雞 | 北區 | 2014/4/27 | 70 | 70 | |
紅羽土雞 | 北區 | 2015/4/30 | 71.67 | 71.67 | |
紅羽土雞 | 北區 | 2016/3/16 | 78.33 | 78.33 | |
紅羽土雞 | 北區 | 2016/5/31 | 78.33 | 78.33 | |
紅羽土雞 | 北區 | 2016/8/7 | 76.67 | 76.67 | |
紅羽土雞 | 北區 | 2017/6/14 | 60 | 60 | |
雞蛋 | 大運輸-3 | 2017/6/14 | 37.5 | 37.50 |
OpenData資料錯誤,等待OpenData重抓資料
品項 | 規格 | 價格日期 | 價格 | 平台 | 差異 |
---|---|---|---|---|---|
紅羽土雞 | 北區 | 2015/4/23 | 75 | 73.33 | 1.67 |
等待畜產會確認價格
品項 | 規格 | 價格日期 | 價格 | 平台 | 差異 |
---|---|---|---|---|---|
白肉雞 | 2014/2/3 | 46.33 | 45.83 | 0.5 | |
白肉雞 | 2014/10/24 | 49.67 | 49.17 | 0.5 | |
白肉雞 | 2014/10/25 | 49.67 | 49.17 | 0.5 | |
白肉雞 | 2015/7/10 | 48.33 | 48 | 0.33 | |
白肉雞 | 2015/9/4 | 48 | 48.33 | -0.33 | |
白肉雞 | 2018/8/31 | 45.5 | 45 | 0.5 | |
紅羽土雞 | 北區 | 2014/5/3 | 68.33 | 70 | -1.67 |
紅羽土雞 | 北區 | 2014/7/23 | 58.33 | 60 | -1.67 |
紅羽土雞 | 北區 | 2014/12/23 | 88.33 | 90 | -1.67 |
紅羽土雞 | 北區 | 2015/1/30 | 81.67 | 80 | 1.67 |
紅羽土雞 | 北區 | 2015/3/30 | 75 | 76.67 | -1.67 |
紅羽土雞 | 北區 | 2015/7/22 | 83.33 | 85 | -1.67 |
紅羽土雞 | 北區 | 2015/11/16 | 73.33 | 75 | -1.67 |
紅羽土雞 | 北區 | 2015/11/23 | 80 | 81.67 | -1.67 |
紅羽土雞 | 北區 | 2015/12/4 | 85 | 83.33 | 1.67 |
休市
品項 | 規格 | 價格日期 | 價格 | 平台 | 差異 |
---|---|---|---|---|---|
紅羽土雞 | 北區 | 2015/1/26 | 85 | 85 | |
紅羽土雞 | 北區 | 2015/1/27 | 85 | 85 | |
紅羽土雞 | 北區 | 2015/2/18 | 70 | 70 | |
紅羽土雞 | 北區 | 2015/2/19 | 70 | 70 | |
紅羽土雞 | 北區 | 2015/2/20 | 70 | 70 | |
紅羽土雞 | 北區 | 2015/2/21 | 70 | 70 | |
紅羽土雞 | 北區 | 2015/2/22 | 70 | 70 | |
紅羽土雞 | 北區 | 2015/2/23 | 70 | 70 |
價格以區間顯示,Ex:40-41
品項 | 規格 | 價格日期 | 價格 | 平台 | 差異 |
---|---|---|---|---|---|
紅羽土雞 | 北區 | 2014/5/22 | 67.5 | 67.5 | |
紅羽土雞 | 北區 | 2014/5/23 | 67.5 | 67.5 | |
紅羽土雞 | 北區 | 2014/5/24 | 67.5 | 67.5 | |
紅羽土雞 | 北區 | 2014/5/25 | 67.5 | 67.5 | |
紅羽土雞 | 北區 | 2014/5/29 | 69.17 | 69.17 |
原始資料出現以下情形:
平均價格 | 交易量 | 重量 |
---|---|---|
0 | 0 | 88 |
2 | 0 | 0 |
這些資料在計算時必須汰除,但會造成細項加權得出的合計值有誤差
實際案例API連結:
product: 其他豬
source: 雲林縣
avg_price: 0.0
volume: 88
avg_weight: 0.0
date: 2018-09-23
品項 | 規格 | 日期 | 指標 | 業務單位 | 開放資料 |
---|---|---|---|---|---|
白肉雞 | 2016/8/7 | 價格 | 46.33 | ||
白肉雞 | 2014/10/8 | 價格 | 50 | 50.5 | |
白肉雞 | 2014/4/27 | 價格 | 49.67 | ||
白肉雞 | 2015/4/30 | 價格 | 49.67 | ||
白肉雞 | 2016/3/16 | 價格 | 48 | ||
白肉雞 | 2016/5/31 | 價格 | 48 | ||
白肉雞 | 2017/6/14 | 價格 | 45 | ||
紅羽土雞 | 北區 | 2014/4/27 | 價格 | 70 | |
紅羽土雞 | 北區 | 2015/4/30 | 價格 | 71.67 | |
紅羽土雞 | 北區 | 2016/3/16 | 價格 | 78.33 | |
紅羽土雞 | 北區 | 2016/5/31 | 價格 | 78.33 | |
紅羽土雞 | 北區 | 2016/8/7 | 價格 | 76.67 | |
紅羽土雞 | 北區 | 2017/6/14 | 價格 | 60 | |
雞蛋 | 大運輸-3 | 2017/6/14 | 價格 | 37.5 | |
紅羽土雞 | 北區 | 2015/4/23 | 價格 | 75 | 73.33 |
紅羽土雞 | 北區 | 2015/12/4 | 價格 | 85 | 83.33 |
白肉雞 | 1.75-1.95Kg | 2019/1/19 | 價格 | 41.3 | |
紅羽土雞 | 北區 | 2019/1/19 | 價格 | 65.6 | |
雞蛋 | 產地 | 2019/1/19 | 價格 | 60.8 | |
土番鴨 | 75天 | 2019/1/19 | 價格 | 69.7 |
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.