You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/industry/agriculture/get-weather-data-from-weather-partner.md
+60-56Lines changed: 60 additions & 56 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,23 +9,23 @@ ms.author: sunasing
9
9
10
10
# Get weather data from weather partners
11
11
12
-
Azure FarmBeats helps you to bring weather data from your weather data provider(s) into Datahub using a docker-based Connector Framework. Using this framework, weather data providers implement a docker that can be integrated with FarmBeats. Currently the following weather data providers are supported:
12
+
Azure FarmBeats helps you to bring weather data from your weather data provider(s) using a docker-based Connector Framework. Using this framework, weather data providers implement a docker that can be integrated with FarmBeats. Currently the following weather data providers are supported:
13
13
14
14
[NOAA data from Azure Open Datasets](https://azure.microsoft.com/services/open-datasets/)
15
15
16
16
The weather data can be used to generate actionable insights and build AI/ML models on FarmBeats.
17
17
18
18
## Before you start
19
19
20
-
To get weather data, ensure that you have installed FarmBeats. **Weather integration is supported in version 1.3.0 or higher**. To install Azure FarmBeats, see [Install FarmBeats](https://aka.ms/farmbeatsinstalldocumentation).
20
+
To get weather data, ensure that you have installed FarmBeats. **Weather integration is supported in version 1.2.11 or higher**. To install Azure FarmBeats, see [Install FarmBeats](https://aka.ms/farmbeatsinstalldocumentation).
21
21
22
22
## Enable weather integration with FarmBeats
23
23
24
-
To start getting weather data on your FarmBeats Data hub, follow the steps below:
24
+
To start getting weather data on your FarmBeats Data hub, follow the steps below:
25
25
26
-
1. Go to your FarmBeats Data hub swagger (https://yourdatahub.azurewebsites.net/swagger)
26
+
1. Go to your FarmBeats Data hub swagger (https://yourdatahub.azurewebsites.net/swagger)
27
27
28
-
2. Navigate to /Partner API and make a POST request with the following input payload:
28
+
2. Navigate to /Partner API and make a POST request with the following input payload:
29
29
30
30
```json
31
31
{
@@ -57,22 +57,23 @@ To start getting weather data on your FarmBeats Data hub, follow the steps below
57
57
For example, to get weather data from NOAA by Azure Open Datasets, use the payload below. You can modify the name and description as per your preference.
58
58
59
59
```json
60
-
{
61
-
62
-
"dockerDetails": {
63
-
"imageName": "azurefarmbeats/farmbeats-noaa",
64
-
"imageTag": "latest",
65
-
"azureBatchVMDetails": {
66
-
"batchVMSKU": "standard_d2_v2",
67
-
"dedicatedComputerNodes": 1,
68
-
"nodeAgentSKUID": "batch.node.ubuntu 18.04"
69
-
}
70
-
},
71
-
"partnerType": "Weather",
72
-
"name": "ods-noaa",
73
-
"description": "NOAA data from Azure Open Datasets registered as a Weather Partner"
60
+
{
61
+
62
+
"dockerDetails": {
63
+
"imageName": "azurefarmbeats/farmbeats-noaa",
64
+
"imageTag": "latest",
65
+
"azureBatchVMDetails": {
66
+
"batchVMSKU": "standard_d2_v2",
67
+
"dedicatedComputerNodes": 1,
68
+
"nodeAgentSKUID": "batch.node.ubuntu 18.04"
69
+
}
70
+
},
71
+
"partnerType": "Weather",
72
+
"name": "ods-noaa",
73
+
"description": "NOAA data from Azure Open Datasets registered as a Weather Partner"
74
74
}
75
75
```
76
+
76
77
> [!NOTE]
77
78
> For more information about the Partner object, see [Appendix](get-weather-data-from-weather-partner.md#appendix)
78
79
@@ -87,44 +88,45 @@ It takes about 10-15 minutes to provision the above resources.
87
88
88
89
5. Now your FarmBeats instance has an active weather data partner and you can run jobs to request weather data for a particular location (latitude/longitude) and a date range. The JobType(s) will have details on what parameters are required to run weather jobs.
89
90
90
-
For example, for NOAA data from Azure Open Datasets, following JobType(s) will be created:
91
+
For example, for NOAA data from Azure Open Datasets, following JobType(s) will be created:
6. Make a note of the **id** and the parameters of the JobType(s).
96
+
6. Make a note of the **ID** and the parameters of the JobType(s).
96
97
97
98
7. Navigate to /Jobs API and make a POST request on /Jobs with the following input payload:
98
99
99
100
```json
100
-
{
101
-
"typeId": "<id of the interested JobType>",
102
-
"arguments": {
103
-
"additionalProp1": {},
104
-
"additionalProp2": {},
105
-
"additionalProp3": {}
106
-
},
107
-
"name": "<name of the job>",
108
-
"description": "<description>",
109
-
"properties": {}
110
-
}
101
+
{
102
+
"typeId": "<id of the JobType>",
103
+
"arguments": {
104
+
"additionalProp1": {},
105
+
"additionalProp2": {},
106
+
"additionalProp3": {}
107
+
},
108
+
"name": "<name of the job>",
109
+
"description": "<description>",
110
+
"properties": {}
111
+
}
111
112
```
112
-
For example, to run **get_weather_data**, use the following payload:
113
+
114
+
For example, to run **get_weather_data**, use the following payload:
113
115
114
116
```json
115
-
{
116
-
117
-
"typeId": "<id of the interested JobType>",
118
-
"arguments": {
119
-
"latitude": "<latitude>",
120
-
"longitude": "<longitude>",
121
-
"start_date": "<start date of interest>",
122
-
"end_date": "<end date of interest>"
123
-
},
124
-
"name": "<name of the job>",
117
+
{
118
+
119
+
"typeId": "<id of the JobType>",
120
+
"arguments": {
121
+
"latitude": 47.620422,
122
+
"longitude": -122.349358,
123
+
"start_date": "yyyy-mm-dd",
124
+
"end_date": "yyyy-mm-dd"
125
+
},
126
+
"name": "<name of the job>",
125
127
"description": "<description>",
126
128
"properties": {}
127
-
}
129
+
}
128
130
```
129
131
130
132
8. The above step will run the weather jobs as defined in the partner docker and ingest weather data into FarmBeats. You can check the status of the job by making a GET request on /Jobs and look for **currentState** in the response. Once complete, the currentState is set to **Succeeded**.
@@ -140,7 +142,7 @@ After the weather jobs are complete, you can query ingested weather data to buil
140
142
141
143
To query weather data using FarmBeats REST API, follow the steps below:
142
144
143
-
1. In your FarmBeats Data hub swagger (https://yourdatahub.azurewebsites.net/swagger), navigate to /WeatherDataLocation API and make a GET request. The response will have /WeatherDataLocation object(s) created for the location (latitude/longitude) that was specified as part of the job run. Make a note of the **id** and the **weatherDataModelId** of the object(s).
145
+
1. In your FarmBeats Data hub swagger (https://yourdatahub.azurewebsites.net/swagger), navigate to /WeatherDataLocation API and make a GET request. The response will have /WeatherDataLocation object(s) created for the location (latitude/longitude) that was specified as part of the job run. Make a note of the **ID** and the **weatherDataModelId** of the object(s).
144
146
145
147
2. Make a GET/{id} on /WeatherDataModel API for the **weatherDataModelId** as noted in step 1. The "Weather Data Model" has all the metadata and details about the ingested weather data. For example, **Weather Measure** within the **Weather Data Model** object has details about what weather information is supported and in what types and units. For example,
146
148
@@ -154,19 +156,21 @@ To query weather data using FarmBeats REST API, follow the steps below:
154
156
"description": "<Description of the measure>"
155
157
}
156
158
```
159
+
157
160
Make a note of the response from the GET/{id} call for the Weather Data Model.
158
161
159
-
3. Navigate to **Telemetry** API and make a POST request with the following input payload:
162
+
3. Navigate to **Telemetry** API and make a POST request with the following input payload:
160
163
161
164
```json
162
165
{
163
-
"weatherDataLocationId": "<id from step 1 above>",
164
-
"searchSpan": {
165
-
"from": "<from time range>",
166
-
"to": "<to time range>"
166
+
"weatherDataLocationId": "<id from step 1 above>",
167
+
"searchSpan": {
168
+
"from": "2020-XX-XXT07:30:00Z",
169
+
"to": "2020-XX-XXT07:45:00Z"
167
170
}
168
171
}
169
172
```
173
+
170
174
4. The response containing weather data that is available for the specified time range will look like this:
171
175
172
176
```json
@@ -189,7 +193,7 @@ Make a note of the response from the GET/{id} call for the Weather Data Model.
189
193
29.1,
190
194
30.2
191
195
],
192
-
"name": "Temperature <name of the SensorMeasure as defined in the SensorModel object>",
196
+
"name": "Temperature <name of the WeatherMeasure as defined in the WeatherDataModel object>",
193
197
"type": "Double <Data Type of the value - eg. Double>"
194
198
}
195
199
]
@@ -206,15 +210,11 @@ Weather data is received on an EventHub and then pushed to a TSI environment wit
206
210
207
211
Follow the steps to visualize data on TSI:
208
212
209
-
1. Go to **Azure Portal** > **FarmBeats DataHub resource group** > select **Time Series Insights** environment (tsi-xxxx) > **Data Access Policies**. Add user with Reader or Contributor access.
213
+
1. Go to **Azure portal** > **FarmBeats DataHub resource group** > select **Time Series Insights** environment (tsi-xxxx) > **Data Access Policies**. Add user with Reader or Contributor access.
210
214
2. Go to the **Overview** page of **Time Series Insights** environment (tsi-xxxx) and select the **Time Series Insights Explorer URL**. You can now visualize the ingested weather data.
211
215
212
216
Apart from storing, querying and visualization of weather data, TSI also enables integration to a Power BI dashboard. For more information, see [here](https://docs.microsoft.com/azure/time-series-insights/how-to-connect-power-bi)
213
217
214
-
## Next steps
215
-
216
-
You now have queried sensor data from your Azure FarmBeats instance. Now, learn how to [generate maps](generate-maps-in-azure-farmbeats.md#generate-maps) for your farms.
217
-
218
218
## Appendix
219
219
220
220
| Partner | Details |
@@ -229,3 +229,7 @@ You now have queried sensor data from your Azure FarmBeats instance. Now, learn
229
229
| partnerType | "Weather" (Other partner types in FarmBeats are "Sensor" and "Imagery") |
230
230
| name | Desired name of the partner in FarmBeats system |
231
231
| description | Description |
232
+
233
+
## Next steps
234
+
235
+
You now have queried sensor data from your Azure FarmBeats instance. Now, learn how to [generate maps](generate-maps-in-azure-farmbeats.md#generate-maps) for your farms.
0 commit comments