SlideShare una empresa de Scribd logo
1 de 17
好資料壞資料
參考資料:http://hackfoldr.org/OD_ResearchProject/
提問:www.slido.com code:#1985
好資料壞資料
政府資料的評比+整個政府網站都是我的資料庫
研究緣起
2
• 專案名稱:104年度國家發展委員會政府資料開放委外專案
• 研究項目:
資料品質評鑑機制
- 建立資料品質評鑑指標,期能提升國內資料品質
- 建立data schema範例、提供共通性欄位之標準參照
規劃政府機關網站資料結構化流程
- 對照「政府網站版型與內容管理規範」建立政府網站共通
性內容的標註性語彙
API服務水準研析建議
- 瞭解目前其他機關介接政府資料開放平臺之API所面臨的問
題
- 分析國內外開放資料平台所提供之API標準,提供平臺API
服務改善建議
資料集品質評鑑機制社群討論會議:2016.7.9 3
Agenda
2
一、Data.gov.tw 資料集現況
二、定義好資料
三、資料集評鑑機制
四、Data Schema Sample
5
Data.gov.tw 資料集現況
連線狀況
回傳代碼
連線狀況
代碼說明
筆數
2016/2/23 2016/3/2 2016/3/15
-1 HTTP連線失敗 2,075 901 905
-2 HTTP連線成功,但無法判斷檔案格式 6,360 6,363 2,212
200 HTTP連線成功,且可判斷檔案格式 13,217 14,367 18,514
204 No Content 2 2 2
400 Bad Request 1 1 1
401 Unauthorized 1 1 1
403 Forbidden 13 13 13
404 Not Found 169 189 189
500 Internal Server Error 33 34 34
502 Bad Gateway 4 4 4
503 Service Unavailable 1 1 1
總計 21,876 21,876 21,876
能夠成功連結之資料資源為19,577筆,約佔89%
7z cap csv doc docx geojson gif html jpe json
kml kmz ksh obj ods odt pdf png rar rss
txt wsdl xlb xls xlsx xml zip 無法判斷
6
Data.gov.tw 資料集現況
1. CSV :共5695筆,佔 31 %
2. xml :共2290筆,佔 12 %
3. pdf :共1655筆,佔 9 %
7
Data.gov.tw 資料集現況
機關填列與實際之檔案格式比對 筆數
符合 10,192
不符合 8,313
其他(-1, -2, 204, 400, 401, 403, 404, 500, 502, 503) 3,371
總計 21,876
機關所填列之資料資源格式符合實際之資料資源格式有
10,192筆,僅佔所有資料資源的 47 %
8
什麼是好資料?
分類 面向
資料品質
本質上的資料品質
(Intrinsic Data Quality)
可信度(Believability)
正確性(Accuracy)
客觀性(Objectivity)
聲譽(Reputation)
資料與使用時機相關性的資料品質
(Contextual Data Quality)
具附加價值(Value-added)
相關性(Relevancy)
適時性(Timeliness)
完整性(Completeness)
適當的資料量(Appropriate amount of data)
資料呈現特性的資料品質
(Representational Data Quality)
可解釋性(Interpretability)
易於瞭解(Ease of understanding)
呈現的一致性(Representational consistency)
精簡的呈現(Concise representation)
可取得的資料品質
(Accessibility Data Quality)
可取得性(Accessibility)
取得安全性(Access security)
資料來源:Wang, R. Y., & Strong, D. M. (1996). Beyond Accuracy: What Data Quality Means to Data Consumers.
Journal of Management Information Systems, 12(4), pp5-33.
9
評鑑的兩個原則
可行性
有效性
10
今年度預設評鑑面向
資料品質定義 描述
可取得
(Availability)
資料是否能夠於網路上直接取得
可被處理
(Processability)
資料為機器可讀,且其內容具結構化及編碼一致。
易於理解
(Understandability)
1. 資料是否提供data schema,或於 meta data中提
供資料欄位說明。
2. Data schema或meta data 欄位描述是否完整敘述
欄位名稱、欄位資料型態、欄位允許的值、欄位採
用何種標準化格式。
11
Data Schema
12
欄位名稱 英文欄位名稱 附註
檔案名稱 filename
更新時間 updatetime
引用自ISO 8601標準。日期格式規定為YYYY-MM-
DD,如:2016-03-11;若為日期+時間則需在時間前
面加一大寫字母T,如:2016-03-11T13:33:20
資料編號 index Value type: integer
欄位名稱 columnheading Value type: text
是否必填 required 參考:「限制參照表」
是否唯一值 unique 參考:「限制參照表」
資料型態 datatype 參考:「限制參照表」
值的限制 valueconstraints
標題/描述 title/description Value type: text
資料來源: ESD Schema Guidance, Local government data schemas Schema guidance, http://opendata.esd.org.uk/ESDSchemaGuidance.pdf
CSV lint, How to Write a Schema, http://csvlint.io/about
本研究整理
限制參照表
13
Constraint Value type Description Example
required boolean
若為真,此欄位中一定要有值
If true, there must be a value in this column on every row
yes/no
unique boolean
若為真,此欄位中的值不能重複
If true, each row should have a different value in this column
yes/no
minLength integer
值的最小長度
Every value must contain at least this number of characters
maxLength integer
值的最大長度
No value can have more than this number of characters
pattern regexp
值必須屬於匹配該樣式
Values must match this regular expression
Pattern:
(Female|Male|Female and
Male|Unisex|Male
urinal|Children only|None|)
type URL
資料型態所參照的URL
A URL for a data type which every value must adhere to (see
“data type reference”)
minimum
number or
date/time
最小值
Every value must be at least this value
maximum
Number or
date/time
最大值
No value should be more than this value
datePattern strftime
日期/時間的型態
The format for date/time values in this column
資料來源:JSON Table Schema
Data type reference
• string — http://www.w3.org/2001/XMLSchema#string
• integer — http://www.w3.org/2001/XMLSchema#int
• float — http://www.w3.org/2001/XMLSchema#float
• double — http://www.w3.org/2001/XMLSchema#double
• URL — http://www.w3.org/2001/XMLSchema#anyURI
• boolean — http://www.w3.org/2001/XMLSchema#boolean
• non-positive integer — http://www.w3.org/2001/XMLSchema#nonPositiveInteger
• positive integer — http://www.w3.org/2001/XMLSchema#positiveInteger
• non-negative integer — http://www.w3.org/2001/XMLSchema#nonNegativeInteger
• negative integer — http://www.w3.org/2001/XMLSchema#negativeInteger
• date — http://www.w3.org/2001/XMLSchema#date
• date & time — http://www.w3.org/2001/XMLSchema#dateTime
• year — http://www.w3.org/2001/XMLSchema#gYear
• year & month — http://www.w3.org/2001/XMLSchema#gYearMonth
• time — http://www.w3.org/2001/XMLSchema#time
14
資料來源:JSON Table Schema
15
欄位名稱 英文欄位名稱 建議採用規範
日期 Date Pattern: (ISO 8601)
時間 Time Pattern: (ISO 8601)
日期與時間 DateTime Pattern: (ISO 8601)
地址 Address Pattern: (內政部戶政司村里街路門牌系統|中華郵政地理資訊系統)
電話 Telephone pattern:
性別 Gender pattern:
年度 Year Pattern: (民國年|西元年|)
統一編號 VatNumber Pattern: (財政部統一編號)
縣市代碼 CountyId Pattern: (行政院主計總處中華民國行政區域及村里代碼)
鄉鎮代碼 TownshipId Pattern: (行政院主計總處中華民國行政區域及村里代碼)
經度 GeoX Pattern: (TWD97|WGS84|)
緯度 GeoY Pattern: (TWD97|WGS84|)
常見一般性欄位建議標準
註:剖析約一萬筆資料資源(CSV、XML、JSON)歸納而得常見一般性欄位
16
Sample Data Schema - JSON
資料集:行政院所屬中央及地方機關代碼
URL :http://data.gov.tw/node/7307
17
Sample Data Schema - CSV
資料集:行政院所屬中央及地方機關代碼
URL :http://data.gov.tw/node/7307

Más contenido relacionado

Destacado

Destacado (8)

「105年度政府開放資料研究案」審查會議簡報 v1.4 20160606
「105年度政府開放資料研究案」審查會議簡報 v1.4 20160606「105年度政府開放資料研究案」審查會議簡報 v1.4 20160606
「105年度政府開放資料研究案」審查會議簡報 v1.4 20160606
 
「105年度政府開放資料研究案」品質評鑑專家會議簡報 V1 20160317
「105年度政府開放資料研究案」品質評鑑專家會議簡報 V1 20160317「105年度政府開放資料研究案」品質評鑑專家會議簡報 V1 20160317
「105年度政府開放資料研究案」品質評鑑專家會議簡報 V1 20160317
 
「105年度政府開放資料研究案」資料結構化專家會議簡報 V1.2 20160617
「105年度政府開放資料研究案」資料結構化專家會議簡報 V1.2 20160617「105年度政府開放資料研究案」資料結構化專家會議簡報 V1.2 20160617
「105年度政府開放資料研究案」資料結構化專家會議簡報 V1.2 20160617
 
政府資料開放加值應用研究 研討會簡報
政府資料開放加值應用研究 研討會簡報政府資料開放加值應用研究 研討會簡報
政府資料開放加值應用研究 研討會簡報
 
郵遞公文追蹤系統操作說明
郵遞公文追蹤系統操作說明郵遞公文追蹤系統操作說明
郵遞公文追蹤系統操作說明
 
Introduction to open data quality et
Introduction to open data quality etIntroduction to open data quality et
Introduction to open data quality et
 
李慕約&王向榮/如何備料:資料的抓取、清理以及串接
李慕約&王向榮/如何備料:資料的抓取、清理以及串接李慕約&王向榮/如何備料:資料的抓取、清理以及串接
李慕約&王向榮/如何備料:資料的抓取、清理以及串接
 
余致緯/用數據解決都會城市的停車問題
余致緯/用數據解決都會城市的停車問題余致緯/用數據解決都會城市的停車問題
余致緯/用數據解決都會城市的停車問題
 

資料集品質評鑑社群座談會簡報 V.1 20160705

  • 2. 研究緣起 2 • 專案名稱:104年度國家發展委員會政府資料開放委外專案 • 研究項目: 資料品質評鑑機制 - 建立資料品質評鑑指標,期能提升國內資料品質 - 建立data schema範例、提供共通性欄位之標準參照 規劃政府機關網站資料結構化流程 - 對照「政府網站版型與內容管理規範」建立政府網站共通 性內容的標註性語彙 API服務水準研析建議 - 瞭解目前其他機關介接政府資料開放平臺之API所面臨的問 題 - 分析國內外開放資料平台所提供之API標準,提供平臺API 服務改善建議
  • 5. 5 Data.gov.tw 資料集現況 連線狀況 回傳代碼 連線狀況 代碼說明 筆數 2016/2/23 2016/3/2 2016/3/15 -1 HTTP連線失敗 2,075 901 905 -2 HTTP連線成功,但無法判斷檔案格式 6,360 6,363 2,212 200 HTTP連線成功,且可判斷檔案格式 13,217 14,367 18,514 204 No Content 2 2 2 400 Bad Request 1 1 1 401 Unauthorized 1 1 1 403 Forbidden 13 13 13 404 Not Found 169 189 189 500 Internal Server Error 33 34 34 502 Bad Gateway 4 4 4 503 Service Unavailable 1 1 1 總計 21,876 21,876 21,876 能夠成功連結之資料資源為19,577筆,約佔89%
  • 6. 7z cap csv doc docx geojson gif html jpe json kml kmz ksh obj ods odt pdf png rar rss txt wsdl xlb xls xlsx xml zip 無法判斷 6 Data.gov.tw 資料集現況 1. CSV :共5695筆,佔 31 % 2. xml :共2290筆,佔 12 % 3. pdf :共1655筆,佔 9 %
  • 7. 7 Data.gov.tw 資料集現況 機關填列與實際之檔案格式比對 筆數 符合 10,192 不符合 8,313 其他(-1, -2, 204, 400, 401, 403, 404, 500, 502, 503) 3,371 總計 21,876 機關所填列之資料資源格式符合實際之資料資源格式有 10,192筆,僅佔所有資料資源的 47 %
  • 8. 8 什麼是好資料? 分類 面向 資料品質 本質上的資料品質 (Intrinsic Data Quality) 可信度(Believability) 正確性(Accuracy) 客觀性(Objectivity) 聲譽(Reputation) 資料與使用時機相關性的資料品質 (Contextual Data Quality) 具附加價值(Value-added) 相關性(Relevancy) 適時性(Timeliness) 完整性(Completeness) 適當的資料量(Appropriate amount of data) 資料呈現特性的資料品質 (Representational Data Quality) 可解釋性(Interpretability) 易於瞭解(Ease of understanding) 呈現的一致性(Representational consistency) 精簡的呈現(Concise representation) 可取得的資料品質 (Accessibility Data Quality) 可取得性(Accessibility) 取得安全性(Access security) 資料來源:Wang, R. Y., & Strong, D. M. (1996). Beyond Accuracy: What Data Quality Means to Data Consumers. Journal of Management Information Systems, 12(4), pp5-33.
  • 10. 10 今年度預設評鑑面向 資料品質定義 描述 可取得 (Availability) 資料是否能夠於網路上直接取得 可被處理 (Processability) 資料為機器可讀,且其內容具結構化及編碼一致。 易於理解 (Understandability) 1. 資料是否提供data schema,或於 meta data中提 供資料欄位說明。 2. Data schema或meta data 欄位描述是否完整敘述 欄位名稱、欄位資料型態、欄位允許的值、欄位採 用何種標準化格式。
  • 11. 11
  • 12. Data Schema 12 欄位名稱 英文欄位名稱 附註 檔案名稱 filename 更新時間 updatetime 引用自ISO 8601標準。日期格式規定為YYYY-MM- DD,如:2016-03-11;若為日期+時間則需在時間前 面加一大寫字母T,如:2016-03-11T13:33:20 資料編號 index Value type: integer 欄位名稱 columnheading Value type: text 是否必填 required 參考:「限制參照表」 是否唯一值 unique 參考:「限制參照表」 資料型態 datatype 參考:「限制參照表」 值的限制 valueconstraints 標題/描述 title/description Value type: text 資料來源: ESD Schema Guidance, Local government data schemas Schema guidance, http://opendata.esd.org.uk/ESDSchemaGuidance.pdf CSV lint, How to Write a Schema, http://csvlint.io/about 本研究整理
  • 13. 限制參照表 13 Constraint Value type Description Example required boolean 若為真,此欄位中一定要有值 If true, there must be a value in this column on every row yes/no unique boolean 若為真,此欄位中的值不能重複 If true, each row should have a different value in this column yes/no minLength integer 值的最小長度 Every value must contain at least this number of characters maxLength integer 值的最大長度 No value can have more than this number of characters pattern regexp 值必須屬於匹配該樣式 Values must match this regular expression Pattern: (Female|Male|Female and Male|Unisex|Male urinal|Children only|None|) type URL 資料型態所參照的URL A URL for a data type which every value must adhere to (see “data type reference”) minimum number or date/time 最小值 Every value must be at least this value maximum Number or date/time 最大值 No value should be more than this value datePattern strftime 日期/時間的型態 The format for date/time values in this column 資料來源:JSON Table Schema
  • 14. Data type reference • string — http://www.w3.org/2001/XMLSchema#string • integer — http://www.w3.org/2001/XMLSchema#int • float — http://www.w3.org/2001/XMLSchema#float • double — http://www.w3.org/2001/XMLSchema#double • URL — http://www.w3.org/2001/XMLSchema#anyURI • boolean — http://www.w3.org/2001/XMLSchema#boolean • non-positive integer — http://www.w3.org/2001/XMLSchema#nonPositiveInteger • positive integer — http://www.w3.org/2001/XMLSchema#positiveInteger • non-negative integer — http://www.w3.org/2001/XMLSchema#nonNegativeInteger • negative integer — http://www.w3.org/2001/XMLSchema#negativeInteger • date — http://www.w3.org/2001/XMLSchema#date • date & time — http://www.w3.org/2001/XMLSchema#dateTime • year — http://www.w3.org/2001/XMLSchema#gYear • year & month — http://www.w3.org/2001/XMLSchema#gYearMonth • time — http://www.w3.org/2001/XMLSchema#time 14 資料來源:JSON Table Schema
  • 15. 15 欄位名稱 英文欄位名稱 建議採用規範 日期 Date Pattern: (ISO 8601) 時間 Time Pattern: (ISO 8601) 日期與時間 DateTime Pattern: (ISO 8601) 地址 Address Pattern: (內政部戶政司村里街路門牌系統|中華郵政地理資訊系統) 電話 Telephone pattern: 性別 Gender pattern: 年度 Year Pattern: (民國年|西元年|) 統一編號 VatNumber Pattern: (財政部統一編號) 縣市代碼 CountyId Pattern: (行政院主計總處中華民國行政區域及村里代碼) 鄉鎮代碼 TownshipId Pattern: (行政院主計總處中華民國行政區域及村里代碼) 經度 GeoX Pattern: (TWD97|WGS84|) 緯度 GeoY Pattern: (TWD97|WGS84|) 常見一般性欄位建議標準 註:剖析約一萬筆資料資源(CSV、XML、JSON)歸納而得常見一般性欄位
  • 16. 16 Sample Data Schema - JSON 資料集:行政院所屬中央及地方機關代碼 URL :http://data.gov.tw/node/7307
  • 17. 17 Sample Data Schema - CSV 資料集:行政院所屬中央及地方機關代碼 URL :http://data.gov.tw/node/7307