forked from adobe/xdm
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcurrent-weather.schema.json
More file actions
297 lines (297 loc) · 15.8 KB
/
current-weather.schema.json
File metadata and controls
297 lines (297 loc) · 15.8 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
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
{
"meta:license": [
"Copyright 2022 Adobe Systems Incorporated. All rights reserved.",
"This work is licensed under a Creative Commons Attribution 4.0 International (CC BY 4.0) license",
"you may not use this file except in compliance with the License. You may obtain a copy",
"of the License at https://creativecommons.org/licenses/by/4.0/"
],
"$id": "https://ns.adobe.com/xdm/mixins/current-weather",
"$schema": "http://json-schema.org/draft-06/schema#",
"meta:extensible": true,
"meta:abstract": true,
"meta:intendedToExtend": [
"https://ns.adobe.com/xdm/context/experienceevent",
"https://ns.adobe.com/xdm/classes/weather"
],
"meta:status": "experimental",
"title": "Current Weather",
"type": "object",
"description": "Current weather conditions for a postal code.",
"definitions": {
"customFields": {
"properties": {
"xdm:weather": {
"type": "object",
"properties": {
"xdm:current": {
"title": "Current",
"description": "Current weather conditions for a postal code.",
"type": "object",
"properties": {
"xdm:temperature": {
"title": "Temperature",
"description": "Temperature in defined unit of measure. Range -140 to 140.",
"$ref": "#/definitions/temperature"
},
"xdm:temperatureChange24Hour": {
"title": "Temperature Change 24 hour",
"description": "Change in temperature compared to the report 24 hours ago.",
"$ref": "#/definitions/temperature"
},
"xdm:temperatureFeelsLike": {
"title": "Temperature Feels Like",
"description": "An apparent temperature. It represents what the air temperature “feels like” on exposed human skin due to the combined effect of the wind chill or heat index.\nWhen the temperature is 65°F or higher, the Feels Like value represents the computed Heat Index. When the temperature is below 65°F, the Feels Like value represents the computed Wind Chill.\nRange -140 to 140.",
"$ref": "#/definitions/temperature"
},
"xdm:precip1Hour": {
"title": "Precipitation Last Hour",
"description": "Rolling hour liquid precipitation amount. The amounts presented are a rolling time through the request time (now).",
"$ref": "#/definitions/precipitation"
},
"xdm:precip6Hour": {
"title": "Precipitation Last 6 Hours",
"description": "Rolling six hour liquid precipitation amount. The amounts presented are a rolling time through the request time (now).",
"$ref": "#/definitions/precipitation"
},
"xdm:precip24Hour": {
"title": "Precipitation Last 24 Hours",
"description": "Rolling twenty four hour liquid precipitation amount. The amounts presented are a rolling time through the request time (now).",
"$ref": "#/definitions/precipitation"
},
"xdm:pressureChange": {
"title": "Pressure Change ",
"description": "Change in pressure in the last three hours in Millibars.",
"type": "number"
},
"xdm:pressureMeanSeaLevel": {
"title": "Pressure Mean Sea Level",
"description": "Mean sea level pressure in millibars. In other words, the average barometric pressure at sea level.\nRange - Millibars precise to 1/10th mb.",
"type": "number"
},
"xdm:relativeHumidity": {
"title": "Relative Humidity",
"description": "The relative humidity of the air, which is defined as the ratio of the amount of water vapor in the air to the amount of vapor required to bring the air to saturation at a constant temperature. Relative humidity is always expressed as a percentage.\nRange - 0 to 100.",
"type": "integer"
},
"xdm:snow1Hour": {
"title": "Snow Last Hour",
"description": "One hour snowfall amount. The amounts presented are a rolling time through the request time (now).",
"$ref": "#/definitions/snowfall"
},
"xdm:snow6Hour": {
"title": "Snow Last 6 Hours",
"description": "One hour snowfall amount. The amounts presented are a rolling time through the request time (now).",
"$ref": "#/definitions/snowfall"
},
"xdm:snow24Hour": {
"title": "Snow 24 Hour",
"description": "Twenty four hour snowfall amount. The amounts presented are a rolling time through the request time (now).",
"$ref": "#/definitions/snowfall"
},
"temperatureDewPoint": {
"title": "Temperature Dew Point",
"description": "The temperature which air must be cooled at constant pressure to reach saturation. The Dew Point is also an indirect measure of the humidity of the air. The Dew Point will never exceed the Temperature. When the Dewpoint and Temperature are equal, clouds or fog will typically form. The closer the values of Temperature and Dew Point, the higher the relative humidity. Range - -80 to 100 (°F) or -62 to 37 (°C).",
"$ref": "#/definitions/temperature"
},
"xdm:temperatureMaxSince7Am": {
"title": "Temperature Max Since 7 AM",
"description": "The maximum temperature since 7 A.M. local time.",
"$ref": "#/definitions/temperature"
},
"xdm:temperatureMin24Hour": {
"title": "Temperature Min Last 24 Hours",
"description": "The minimum temperature in the last 24 hours. The 24 hour period is in reference to the request time (now). ",
"$ref": "#/definitions/temperature"
},
"xdm:uvIndex": {
"title": "UV Index",
"description": "The Weather Channel's proprietary UV index. The UV Index provides indices of the intensity of the solar radiation level and risk of skin damage due to exposure.\nRange - -2=Not Available, -1=No Report, 0-2=Low, 3-5=Moderate, 6-7=High, 8-10= Very High, 11-16=Extreme.",
"$ref": "#/definitions/uvIndex"
},
"xdm:windDirection": {
"title": "Wind Direction",
"description": "The magnetic wind direction from which the wind blows expressed in degrees. The magnetic direction varies from 0 to 359 degrees, where 0° indicates the North, 90° the East, 180° the South, 270° the West, and so forth.\nRange - 0<=wind_dire_deg<=350, in 10 degree intervals.",
"type": "integer"
},
"xdm:windGust": {
"title": "Wind Gust",
"description": "This data field contains information about sudden and temporary variations of the average Wind Speed. The report always shows the maximum wind gust speed recorded during the observation period. It is a required display field if Wind Speed is shown. The speed of the gust can be expressed in miles per hour or kilometers per hour.",
"$ref": "#/definitions/speed"
},
"xdm:windSpeed": {
"title": "Wind Speed",
"description": "The wind is treated as a vector; hence, winds must have direction and magnitude (speed). The wind information reported in the current conditions corresponds to a 10-minute average called the sustained wind speed. Sudden or brief variations in the wind speed are known as “wind gusts” and are reported in a separate data field. Wind directions are always expressed as \"from whence the wind blows\" meaning that a North wind blows from North to South. If you face North in a North wind the wind is at your face. Face southward and the North wind is at your back.",
"$ref": "#/definitions/speed"
},
"xdm:sunsetTime": {
"type": "integer",
"description": "Sunset time in UTC.",
"title": "Sunset Time"
}
}
}
}
}
}
},
"snowfall": {
"properties": {
"xdm:centimeters": {
"title": "Centimeters",
"type": "number",
"description": "Snowfall in centimeters"
},
"xdm:inches": {
"title": "Inches",
"type": "number",
"description": "Snowfall in inches"
}
}
},
"precipitation": {
"properties": {
"xdm:millimeters": {
"title": "Millimeters",
"type": "number",
"description": "Precipitation in millimeters"
},
"xdm:inches": {
"title": "Inches",
"type": "number",
"description": "Precipitation in inches"
}
}
},
"distance": {
"properties": {
"xdm:kilometers": {
"title": "Kilometers",
"type": "number",
"description": "Distance in kilometers"
},
"xdm:inches": {
"title": "Miles",
"type": "number",
"description": "Distance in miles"
}
}
},
"speed": {
"properties": {
"xdm:kilometersPerHour": {
"title": "Kilometers per Hour",
"type": "integer",
"description": "Wind speed in kilometers per hour"
},
"xdm:milesPerHour": {
"title": "Miles per Hour",
"type": "integer",
"description": "Wind speed in miles per hour"
}
}
},
"temperature": {
"properties": {
"xdm:celsius": {
"title": "Celsius",
"type": "integer",
"description": "Temperature in degrees Celsius"
},
"xdm:fahrenheit": {
"title": "Fahrenheit",
"type": "integer",
"description": "Temperature in degrees Fahrenheit"
}
}
},
"uvIndex": {
"properties": {
"xdm:_name": {
"type": "string",
"description": "Index name"
},
"xdm:value": {
"type": "string",
"description": "Index value"
}
}
}
},
"allOf": [
{
"$ref": "#/definitions/customFields"
}
],
"examples": [
{
"xdm:weather": {
"xdm:current": {
"xdm:temperature": {
"xdm:celsius": 10,
"xdm:fahrenheit": 50
},
"xdm:temperatureChange24Hour": {
"xdm:celsius": 1,
"xdm:fahrenheit": 2
},
"xdm:temperatureFeelsLike": {
"xdm:celsius": 12,
"xdm:fahrenheit": 54
},
"xdm:precip1Hour": {
"xdm:millimeters": 0,
"xdm:inches": 0
},
"xdm:precip6Hour": {
"xdm:millimeters": 0,
"xdm:inches": 0
},
"xdm:precip24Hour": {
"xdm:millimeters": 6,
"xdm:inches": 0.25
},
"xdm:pressureChange": 5,
"xdm:pressureMeanSeaLevel": 7.5,
"xdm:snow1Hour": {
"xdm:centimeters": 30,
"xdm:inches": 12
},
"xdm:snow6Hour": {
"xdm:centimeters": 30,
"xdm:inches": 12
},
"xdm:snow24Hour": {
"xdm:centimeters": 30,
"xdm:inches": 12
},
"xdm:temperatureDewPoint": {
"xdm:celsius": 3,
"xdm:fahrenheit": 37
},
"xdm:temperatureMaxSince7Am": {
"xdm:celsius": 24,
"xdm:fahrenheit": 75
},
"xdm:temperatureMin24Hour": {
"xdm:celsius": 2,
"xdm:fahrenheit": 35
},
"xdm:uvIndex": {
"xdm:_name": "UV_3",
"xdm:value": "3"
},
"xdm:windDirection": 17,
"xdm:windGust": {
"xdm:kilometersPerHour": 24,
"xdm:milesPerHour": 15
},
"xdm:windSpeed": {
"xdm:kilometersPerHour": 15,
"xdm:milesPerHour": 9
},
"xdm:sunsetTime": 1660324163
}
}
}
]
}