forked from MLT-OSS/FirstData
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdatasource-schema.json
More file actions
152 lines (152 loc) · 4.21 KB
/
datasource-schema.json
File metadata and controls
152 lines (152 loc) · 4.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://firstdata.org/schemas/firstdata-v2.json",
"title": "FirstData Metadata Schema (Simplified)",
"description": "Simplified schema for describing authoritative data sources - removes complex nested structures and quality scoring",
"version": "2.0.0",
"type": "object",
"required": [
"id",
"name",
"description",
"website",
"data_url",
"authority_level",
"domains",
"tags"
],
"properties": {
"id": {
"type": "string",
"description": "Unique identifier (lowercase, hyphen-separated)",
"pattern": "^[a-z0-9-]+$",
"examples": ["china-nbs", "worldbank-open-data", "hkex"]
},
"name": {
"type": "object",
"description": "Data source name in multiple languages",
"required": ["en"],
"properties": {
"en": {
"type": "string",
"description": "English name"
},
"zh": {
"type": "string",
"description": "Chinese name"
}
}
},
"description": {
"type": "object",
"description": "Detailed description of the data source",
"required": ["en"],
"properties": {
"en": {
"type": "string",
"description": "English description"
},
"zh": {
"type": "string",
"description": "Chinese description"
}
}
},
"website": {
"type": "string",
"format": "uri",
"description": "Organization homepage URL (top-level website)"
},
"data_url": {
"type": "string",
"format": "uri",
"description": "Direct URL to data access page (not organization homepage - should point to data query/download interface)"
},
"api_url": {
"type": ["string", "null"],
"format": "uri",
"description": "API documentation or endpoint URL. Set to null if no API is available."
},
"authority_level": {
"type": "string",
"description": "Authority level of the data source organization",
"enum": [
"government",
"international",
"market",
"research",
"commercial",
"other"
]
},
"country": {
"type": ["string", "null"],
"description": "ISO 3166-1 alpha-2 country code. Only use this field when the data source clearly belongs to a specific country AND geographic_scope is 'national' or 'subnational'. MUST be null when geographic_scope is 'global' or 'regional'.",
"pattern": "^[A-Z]{2}$",
"examples": ["CN", "US", "HK", "JP", null]
},
"domains": {
"type": "array",
"description": "Data domains covered by this source",
"items": {
"type": "string"
},
"minItems": 1,
"examples": [
["finance", "economics"],
["health", "social"],
["environment", "climate"]
]
},
"geographic_scope": {
"type": "string",
"description": "Geographic coverage level",
"enum": ["global", "regional", "national", "subnational"]
},
"update_frequency": {
"type": "string",
"description": "Data update frequency",
"enum": [
"real-time",
"daily",
"weekly",
"monthly",
"quarterly",
"annual",
"irregular"
]
},
"tags": {
"type": "array",
"description": "Search tags - mixed Chinese/English keywords, synonyms, data types, and related terms for improved discoverability",
"items": {
"type": "string"
},
"minItems": 1,
"examples": [
["gdp", "经济增长", "economic-growth"],
["ipo", "招股书", "prospectus", "上市公司"]
]
},
"data_content": {
"type": "object",
"description": "Detailed descriptions of data categories and content available from this source",
"properties": {
"en": {
"type": "array",
"description": "English data content descriptions",
"items": {
"type": "string"
}
},
"zh": {
"type": "array",
"description": "Chinese data content descriptions",
"items": {
"type": "string"
}
}
}
}
}
}