Skip to content

Commit 4eea691

Browse files
authored
Changes to address indentation, punctuation
1 parent af7dd8b commit 4eea691

File tree

1 file changed

+138
-137
lines changed

1 file changed

+138
-137
lines changed

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

Lines changed: 138 additions & 137 deletions
Original file line numberDiff line numberDiff line change
@@ -27,59 +27,59 @@ To start getting weather data on your FarmBeats Data hub, follow the steps below
2727

2828
2. Navigate to /Partner API and make a POST request with the following input payload:
2929

30-
```json
31-
{
32-
33-
"dockerDetails": { 
34-
    "credentials": { 
35-
      "username": "<credentials to access private docker - not required for public docker>", 
36-
      "password": "<credentials to access private docker – not required for public docker>" 
37-
    },
38-
    "imageName" : "<docker image name. Default is azurefarmbeats/fambeats-noaa>",
39-
    "imageTag" : "<docker image tag, default:latest>",
40-
    "azureBatchVMDetails": { 
41-
      "batchVMSKU" : "<VM SKU. Default is standard_d2_v2>", 
42-
      "dedicatedComputerNodes" : 1,
43-
      "nodeAgentSKUID": "<Node SKU. Default is batch.node.ubuntu 18.04>" 
44-
    }
45-
},
46-
"partnerCredentials": { 
47-
    "key1": "value1", 
48-
    "key2": "value2" 
49-
}, 
50-
"partnerType": "Weather", 
51-
"name": "<Name of the partner>", 
52-
"description": "<Description>",
53-
"properties": {  } 
54-
} 
55-
```
56-
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-
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"
74-
}
75-
```
76-
77-
> [!NOTE]
78-
> For more information about the Partner object, see [Appendix](get-weather-data-from-weather-partner.md#appendix)
79-
80-
The above step will provision the resources to enable docker to run in the customer's FarmBeats environment.
81-
82-
It takes about 10-15 minutes to provision the above resources.
30+
```json
31+
{
32+
33+
"dockerDetails": {
34+
"credentials": {
35+
"username": "<credentials to access private docker - not required for public docker>",
36+
"password": "<credentials to access private docker – not required for public docker>"
37+
},
38+
"imageName" : "<docker image name. Default is azurefarmbeats/fambeats-noaa>",
39+
"imageTag" : "<docker image tag, default:latest>",
40+
"azureBatchVMDetails": {
41+
"batchVMSKU" : "<VM SKU. Default is standard_d2_v2>",
42+
"dedicatedComputerNodes" : 1,
43+
"nodeAgentSKUID": "<Node SKU. Default is batch.node.ubuntu 18.04>"
44+
}
45+
},
46+
"partnerCredentials": {
47+
"key1": "value1",
48+
"key2": "value2"
49+
},
50+
"partnerType": "Weather",
51+
"name": "<Name of the partner>",
52+
"description": "<Description>",
53+
"properties": {}
54+
}
55+
```
56+
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+
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"
74+
}
75+
```
76+
77+
> [!NOTE]
78+
> For more information about the Partner object, see [Appendix](get-weather-data-from-weather-partner.md#appendix)
79+
80+
The preceding step will provision the resources to enable docker to run in the customer's FarmBeats environment.
81+
82+
It takes about 10-15 minutes to provision the above resources.
8383

8484
3. Check the status of the /Partner object that you created in step 2. To do this, make a GET request on /Partner API and check for the **status** of the partner object. Once FarmBeats provisions the partner successfully, the status is set to **Active**.
8585

@@ -88,48 +88,48 @@ It takes about 10-15 minutes to provision the above resources.
8888

8989
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.
9090

91-
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:
9292

93-
- get_weather_data (Get ISD/historical weather data)
94-
- get_weather_forecast_data (Get GFS/forecast weather data)
93+
- get_weather_data (Get ISD/historical weather data)
94+
- get_weather_forecast_data (Get GFS/forecast weather data)
9595

9696
6. Make a note of the **ID** and the parameters of the JobType(s).
9797

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

100-
```json
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-
}
112-
```
113-
114-
For example, to run **get_weather_data**, use the following payload:
115-
116-
```json
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>",
127-
"description": "<description>",
128-
"properties": {}
129-
}
130-
```
131-
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**.
100+
```json
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+
}
112+
```
113+
114+
For example, to run **get_weather_data**, use the following payload:
115+
116+
```json
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>",
127+
"description": "<description>",
128+
"properties": {}
129+
}
130+
```
131+
132+
8. The preceding 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**.
133133

134134
## Query ingested weather data
135135

@@ -146,74 +146,75 @@ To query weather data using FarmBeats REST API, follow the steps below:
146146

147147
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,
148148

149-
```json
150-
{
151-
"name": "Temperature <name of the weather measure - this is what we will receive as part of the queried weather data>",
152-
"dataType": "Double <Data Type - eg. Double, Enum>",
153-
"type": "AmbientTemperature <Type of measure eg. AmbientTemperature, Wind speed etc.>",
154-
"unit": "Celsius <Unit of measure eg. Celsius, Percentage etc.>",
155-
"aggregationType": "None <either of None, Average, Maximum, Minimum, StandardDeviation, Sum, Total>",
156-
"description": "<Description of the measure>"
157-
}
158-
```
149+
```json
150+
{
151+
"name": "Temperature <name of the weather measure - this is what we will receive as part of the queried weather data>",
152+
"dataType": "Double <Data Type - eg. Double, Enum>",
153+
"type": "AmbientTemperature <Type of measure eg. AmbientTemperature, Wind speed etc.>",
154+
"unit": "Celsius <Unit of measure eg. Celsius, Percentage etc.>",
155+
"aggregationType": "None <either of None, Average, Maximum, Minimum, StandardDeviation, Sum, Total>",
156+
"description": "<Description of the measure>"
157+
}
158+
```
159159

160-
Make a note of the response from the GET/{id} call for the Weather Data Model.
160+
Make a note of the response from the GET/{id} call for the Weather Data Model.
161161

162162
3. Navigate to **Telemetry** API and make a POST request with the following input payload:
163163

164-
```json
165-
{
166-
"weatherDataLocationId": "<id from step 1 above>",
167-
"searchSpan": {
168-
"from": "2020-XX-XXT07:30:00Z",
169-
"to": "2020-XX-XXT07:45:00Z"
170-
}
171-
}
172-
```
164+
```json
165+
{
166+
"weatherDataLocationId": "<id from step 1 above>",
167+
"searchSpan": {
168+
"from": "2020-XX-XXT07:30:00Z",
169+
"to": "2020-XX-XXT07:45:00Z"
170+
}
171+
}
172+
```
173173

174174
4. The response containing weather data that is available for the specified time range will look like this:
175175

176-
```json
177-
{
178-
"timestamps": [
179-
"2020-XX-XXT07:30:00Z",
180-
"2020-XX-XXT07:45:00Z"
181-
],
182-
"properties": [
183-
{
184-
"values": [
185-
"<id of the weatherDataLocation>",
186-
"<id of the weatherDataLocation>"
187-
],
188-
"name": "Id",
189-
"type": "String"
190-
},
191-
{
192-
"values": [
193-
29.1,
194-
30.2
195-
],
196-
"name": "Temperature <name of the WeatherMeasure as defined in the WeatherDataModel object>",
197-
"type": "Double <Data Type of the value - eg. Double>"
198-
}
199-
]
200-
}
201-
```
176+
```json
177+
{
178+
"timestamps": [
179+
"2020-XX-XXT07:30:00Z",
180+
"2020-XX-XXT07:45:00Z"
181+
],
182+
"properties": [
183+
{
184+
"values": [
185+
"<id of the weatherDataLocation>",
186+
"<id of the weatherDataLocation>"
187+
],
188+
"name": "Id",
189+
"type": "String"
190+
},
191+
{
192+
"values": [
193+
29.1,
194+
30.2
195+
],
196+
"name": "Temperature <name of the WeatherMeasure as defined in the WeatherDataModel object>",
197+
"type": "Double <Data Type of the value - eg. Double>"
198+
}
199+
]
200+
}
201+
```
202202

203203
In the above example, the response has data for two timestamps along with the measure name ("Temperature") and values of the reported weather data in the two timestamps. You will need to refer to the associated Weather Data Model (as described in step 2 above) to interpret the type and unit of the reported values.
204204

205205
### Query using Azure Time Series Insights (TSI)
206206

207207
FarmBeats uses [Azure Time Series Insights (TSI)](https://azure.microsoft.com/services/time-series-insights/) to ingest, store, query, and visualize data at IoT scale--data that's highly contextualized and optimized for time series.
208208

209-
Weather data is received on an EventHub and then pushed to a TSI environment within FarmBeats resource group. Data can then be directly queried from the TSI. For more information, see [TSI documentation](https://docs.microsoft.com/azure/time-series-insights/time-series-insights-explorer)
209+
Weather data is received on an EventHub and then pushed to a TSI environment within FarmBeats resource group. Data can then be directly queried from the TSI. For more information, see [TSI documentation](https://docs.microsoft.com/azure/time-series-insights/time-series-insights-explorer).
210210

211211
Follow the steps to visualize data on TSI:
212212

213213
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.
214+
214215
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.
215216

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)
217+
Apart from storing, querying and visualization of weather data, TSI also enables integration to a Power BI dashboard. For more information, see [Visualize data from Time Series Insights in Power BI](https://docs.microsoft.com/azure/time-series-insights/how-to-connect-power-bi).
217218

218219
## Appendix
219220

0 commit comments

Comments
 (0)