Skip to content

Commit e0f7618

Browse files
Add example data structure to docs
1 parent dd99933 commit e0f7618

File tree

1 file changed

+85
-1
lines changed

1 file changed

+85
-1
lines changed

docs/source/migration.rst

Lines changed: 85 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,91 @@ Simplified object hierarchy
2525

2626
Python dicts are used instead of classes to allow more flexibility with handling
2727
data returned from the MetOffice API, and because new MetOffice API provides
28-
data with a more convenient structure.
28+
data with a more convenient structure. The concept of 'Days' has also been
29+
removed from the library and instead all time steps are provided in one list.
30+
The data structure for a single time step is::
31+
32+
{
33+
'time': datetime.datetime(2024, 2, 19, 13, 0, tzinfo=datetime.timezone.utc),
34+
'screenTemperature': {
35+
'value': 10.09,
36+
'description': 'Screen Air Temperature',
37+
'unit_name': 'degrees Celsius',
38+
'unit_symbol': 'Cel'
39+
},
40+
'screenDewPointTemperature': {
41+
'value': 8.08,
42+
'description': 'Screen Dew Point Temperature',
43+
'unit_name': 'degrees Celsius',
44+
'unit_symbol': 'Cel'
45+
},
46+
'feelsLikeTemperature': {
47+
'value': 6.85,
48+
'description': 'Feels Like Temperature',
49+
'unit_name': 'degrees Celsius',
50+
'unit_symbol': 'Cel'
51+
},
52+
'windSpeed10m': {
53+
'value': 7.57,
54+
'description': '10m Wind Speed',
55+
'unit_name': 'metres per second',
56+
'unit_symbol': 'm/s'
57+
},
58+
'windDirectionFrom10m': {
59+
'value': 263,
60+
'description': '10m Wind From Direction',
61+
'unit_name': 'degrees',
62+
'unit_symbol': 'deg'
63+
},
64+
'windGustSpeed10m': {
65+
'value': 12.31,
66+
'description': '10m Wind Gust Speed',
67+
'unit_name': 'metres per second',
68+
'unit_symbol': 'm/s'
69+
},
70+
'visibility': {
71+
'value': 21201,
72+
'description': 'Visibility',
73+
'unit_name': 'metres',
74+
'unit_symbol': 'm'
75+
},
76+
'screenRelativeHumidity': {
77+
'value': 87.81,
78+
'description': 'Screen Relative Humidity',
79+
'unit_name': 'percentage',
80+
'unit_symbol': '%'
81+
},
82+
'mslp': {
83+
'value': 103080,
84+
'description': 'Mean Sea Level Pressure',
85+
'unit_name': 'pascals',
86+
'unit_symbol': 'Pa'
87+
},
88+
'uvIndex': {
89+
'value': 1,
90+
'description': 'UV Index',
91+
'unit_name': 'dimensionless',
92+
'unit_symbol': '1'
93+
},
94+
'significantWeatherCode': {
95+
'value': 'Cloudy',
96+
'description': 'Significant Weather Code',
97+
'unit_name': 'dimensionless',
98+
'unit_symbol': '1'
99+
},
100+
'precipitationRate': {
101+
'value': 0.0,
102+
'description': 'Precipitation Rate',
103+
'unit_name': 'millimetres per hour',
104+
'unit_symbol': 'mm/h'
105+
},
106+
'probOfPrecipitation': {
107+
'value': 21,
108+
'description': 'Probability of Precipitation',
109+
'unit_name': 'percentage',
110+
'unit_symbol': '%'
111+
}
112+
}
29113

30114
Different data provided
31115
-----------------------

0 commit comments

Comments
 (0)