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/azure-maps/weather-service-tutorial.md
+42-19Lines changed: 42 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ titleSuffix: Microsoft Azure Maps
4
4
description: Tutorial on how to join sensor data with weather forecast data from Microsoft Azure Maps Weather services using Azure Notebooks(Python).
5
5
author: farazgis
6
6
ms.author: fsiddiqui
7
-
ms.date: 10/28/2021
7
+
ms.date: 10/28/2024
8
8
ms.topic: tutorial
9
9
ms.service: azure-maps
10
10
ms.subservice: weather
@@ -19,40 +19,65 @@ In this tutorial, you will:
19
19
20
20
> [!div class="checklist"]
21
21
>
22
-
> *Work with data files in [Azure Notebooks] in the cloud.
22
+
> *Create and run a [Jupyter Notebook in VS Code].
23
23
> * Load demo data from file.
24
24
> * Call Azure Maps REST APIs in Python.
25
25
> * Render location data on the map.
26
26
> * Enrich the demo data with Azure Maps [Daily Forecast] weather data.
27
27
> * Plot forecast data in graphs.
28
28
29
+
> [!NOTE]
30
+
> The Jupyter notebook file for this project can be downloaded from the [Weather Maps Jupyter Notebook repository].
31
+
29
32
## Prerequisites
30
33
31
34
If you don't have an Azure subscription, create a [free account] before you begin.
32
35
33
36
* An [Azure Maps account]
34
37
* A [subscription key]
38
+
*[Visual Studio Code]
39
+
* A working knowledge of [Jupyter Notebooks in VS Code]
40
+
* Environment set up to work with Python in Jupyter Notebooks. For more information, see [Setting up your environment].
35
41
36
42
> [!NOTE]
37
43
> For more information on authentication in Azure Maps, see [manage authentication in Azure Maps].
38
44
39
-
To get familiar with Azure notebooks and to know how to get started, follow the instructions [Create an Azure Notebook].
45
+
## Install project level packages
40
46
41
-
> [!NOTE]
42
-
> The Jupyter notebook file for this project can be downloaded from the [Weather Maps Jupyter Notebook repository].
47
+
The _EV Routing and Reachable Range_ project has dependencies on the [aiohttp] and [IPython] python libraries. You can install these in the Visual Studio terminal using pip:
48
+
49
+
```python
50
+
pip install aiohttp
51
+
pip install ipython
52
+
pip install pandas
53
+
```
54
+
55
+
## Open Jupyter Notebook in Visual Studio Code
56
+
57
+
Download then open the Notebook used in this tutorial:
58
+
59
+
1. Open the file [weatherDataMaps.ipynb] in the [AzureMapsJupyterSamples] repository in GitHub.
60
+
1. Select the **Download raw file** button in the upper-right corner of the screen to save the file locally.
61
+
62
+

63
+
64
+
1. Open the downloaded Notebook in Visual Studio Code by right-clicking on the file then selecting **Open with > Visual Studio Code**, or through the VS Code File Explorer.
43
65
44
66
## Load the required modules and frameworks
45
67
46
-
To load all the required modules and frameworks, run the following script:
68
+
Once your code is added, you can run a cell using the **Run** icon to the left of the cell and the output is displayed below the code cell.
47
69
48
-
```python
70
+
Run the following script to load all the required modules and frameworks.
71
+
72
+
```Python
73
+
import aiohttp
49
74
import pandas as pd
50
75
import datetime
51
76
from IPython.display import Image, display
52
-
!pip install aiohttp
53
-
import aiohttp
54
77
```
55
78
79
+

80
+
56
81
## Import weather data
57
82
58
83
This tutorial uses weather data readings from sensors installed at four different wind turbines. The sample data consists of 30 days of weather readings. These readings are gathered from weather data centers near each turbine location. The demo data contains data readings for temperature, wind speed and, direction. You can download the demo data contained in [weather_dataset_demo.csv] from GitHub. The script below imports demo data to the Azure Notebook.
@@ -182,28 +207,26 @@ To explore the Azure Maps APIs that are used in this tutorial, see:
182
207
183
208
For a complete list of Azure Maps REST APIs, see [Azure Maps REST APIs].
184
209
185
-
## Clean up resources
186
-
187
-
There are no resources that require cleanup.
188
-
189
210
## Next steps
190
211
191
-
To learn more about Azure Notebooks, see
192
-
193
212
> [!div class="nextstepaction"]
194
-
> [Azure Notebooks]
213
+
> [Learn more about all the notebooks experiences from Microsoft and GitHub]: https://visualstudio.microsoft.com/vs/features/notebooks-at-microsoft/
0 commit comments