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.
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)歸納而得常見一般性欄位