Skip to content

Commit af7dd8b

Browse files
author
Sunayana Singh
committed
updated as per review comments
1 parent fe97596 commit af7dd8b

File tree

1 file changed

+60
-56
lines changed

1 file changed

+60
-56
lines changed

articles/industry/agriculture/get-weather-data-from-weather-partner.md

Lines changed: 60 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,23 @@ ms.author: sunasing
99

1010
# Get weather data from weather partners
1111

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:
1313

1414
[NOAA data from Azure Open Datasets](https://azure.microsoft.com/services/open-datasets/)
1515

1616
The weather data can be used to generate actionable insights and build AI/ML models on FarmBeats.
1717

1818
## Before you start
1919

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).
2121

2222
## Enable weather integration with FarmBeats
2323

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:
2525

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)
2727

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:
2929

3030
```json
3131
{
@@ -57,22 +57,23 @@ To start getting weather data on your FarmBeats Data hub, follow the steps below
5757
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.
5858

5959
```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"
7474
}
7575
```
76+
7677
> [!NOTE]
7778
> For more information about the Partner object, see [Appendix](get-weather-data-from-weather-partner.md#appendix)
7879
@@ -87,44 +88,45 @@ It takes about 10-15 minutes to provision the above resources.
8788

8889
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.
8990

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:
9192

9293
- get_weather_data (Get ISD/historical weather data)
9394
- get_weather_forecast_data (Get GFS/forecast weather data)
9495

95-
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).
9697

9798
7. Navigate to /Jobs API and make a POST request on /Jobs with the following input payload:
9899

99100
```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+
}
111112
```
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:
113115

114116
```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>",
125127
"description": "<description>",
126128
"properties": {}
127-
}
129+
}
128130
```
129131

130132
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
140142

141143
To query weather data using FarmBeats REST API, follow the steps below:
142144

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).
144146

145147
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,
146148

@@ -154,19 +156,21 @@ To query weather data using FarmBeats REST API, follow the steps below:
154156
"description": "<Description of the measure>"
155157
}
156158
```
159+
157160
Make a note of the response from the GET/{id} call for the Weather Data Model.
158161

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:
160163

161164
```json
162165
{
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"
167170
}
168171
}
169172
```
173+
170174
4. The response containing weather data that is available for the specified time range will look like this:
171175

172176
```json
@@ -189,7 +193,7 @@ Make a note of the response from the GET/{id} call for the Weather Data Model.
189193
29.1,
190194
30.2
191195
],
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>",
193197
"type": "Double <Data Type of the value - eg. Double>"
194198
}
195199
]
@@ -206,15 +210,11 @@ Weather data is received on an EventHub and then pushed to a TSI environment wit
206210

207211
Follow the steps to visualize data on TSI:
208212

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.
210214
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.
211215

212216
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)
213217

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-
218218
## Appendix
219219

220220
| Partner | Details |
@@ -229,3 +229,7 @@ You now have queried sensor data from your Azure FarmBeats instance. Now, learn
229229
| partnerType | "Weather" (Other partner types in FarmBeats are "Sensor" and "Imagery") |
230230
| name | Desired name of the partner in FarmBeats system |
231231
| 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

Comments
 (0)