Skip to content

Commit d0803d2

Browse files
committed
Update with information related to Jupyter Notebooks in VS Code.
1 parent efa569d commit d0803d2

File tree

3 files changed

+42
-19
lines changed

3 files changed

+42
-19
lines changed
24.6 KB
Loading
12.3 KB
Loading

articles/azure-maps/weather-service-tutorial.md

Lines changed: 42 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ titleSuffix: Microsoft Azure Maps
44
description: Tutorial on how to join sensor data with weather forecast data from Microsoft Azure Maps Weather services using Azure Notebooks(Python).
55
author: farazgis
66
ms.author: fsiddiqui
7-
ms.date: 10/28/2021
7+
ms.date: 10/28/2024
88
ms.topic: tutorial
99
ms.service: azure-maps
1010
ms.subservice: weather
@@ -19,40 +19,65 @@ In this tutorial, you will:
1919

2020
> [!div class="checklist"]
2121
>
22-
> * Work with data files in [Azure Notebooks] in the cloud.
22+
> * Create and run a [Jupyter Notebook in VS Code].
2323
> * Load demo data from file.
2424
> * Call Azure Maps REST APIs in Python.
2525
> * Render location data on the map.
2626
> * Enrich the demo data with Azure Maps [Daily Forecast] weather data.
2727
> * Plot forecast data in graphs.
2828
29+
> [!NOTE]
30+
> The Jupyter notebook file for this project can be downloaded from the [Weather Maps Jupyter Notebook repository].
31+
2932
## Prerequisites
3033

3134
If you don't have an Azure subscription, create a [free account] before you begin.
3235

3336
* An [Azure Maps account]
3437
* 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].
3541

3642
> [!NOTE]
3743
> For more information on authentication in Azure Maps, see [manage authentication in Azure Maps].
3844
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
4046

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+
![A screenshot showing how to download the Notebook file named weatherDataMaps.ipynb from the GitHub repository.](./media/weather-service-tutorial/download-notebook.png)
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.
4365

4466
## Load the required modules and frameworks
4567

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.
4769

48-
```python
70+
Run the following script to load all the required modules and frameworks.
71+
72+
```Python
73+
import aiohttp
4974
import pandas as pd
5075
import datetime
5176
from IPython.display import Image, display
52-
!pip install aiohttp
53-
import aiohttp
5477
```
5578

79+
![A screenshot showing how to download the first cell in the Notebook containing the required import statements with the run button highlighted.](./media/weather-service-tutorial/import-libraries.png)
80+
5681
## Import weather data
5782

5883
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:
182207

183208
For a complete list of Azure Maps REST APIs, see [Azure Maps REST APIs].
184209

185-
## Clean up resources
186-
187-
There are no resources that require cleanup.
188-
189210
## Next steps
190211

191-
To learn more about Azure Notebooks, see
192-
193212
> [!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/
195214
196215
[Azure Maps account]: quick-demo-map-app.md#create-an-azure-maps-account
197216
[Azure Maps REST APIs]: consumption-model.md
198-
[Azure Notebooks]: https://notebooks.azure.com
199-
[Create an Azure Notebook]: tutorial-ev-routing.md#create-an-azure-notebooks-project
217+
[AzureMapsJupyterSamples]: https://github.com/Azure-Samples/Azure-Maps-Jupyter-Notebook
200218
[Daily Forecast API]: /rest/api/maps/weather/getdailyforecast
201219
[Daily Forecast]: /rest/api/maps/weather/getdailyforecast
202220
[EV routing using Azure Notebooks]: tutorial-ev-routing.md
203221
[free account]: https://azure.microsoft.com/free/
204222
[Get Map Image service]: /rest/api/maps/render/get-map-static-image
205-
[manage authentication in Azure Maps]: how-to-manage-authentication.md
223+
[Jupyter Notebook in VS Code]: https://code.visualstudio.com/docs/datascience/jupyter-notebooks
224+
[Jupyter Notebooks in VS Code]: https://code.visualstudio.com/docs/datascience/jupyter-notebooks
225+
[Manage authentication in Azure Maps]: how-to-manage-authentication.md
206226
[Render - Get Map Image]: /rest/api/maps/render/get-map-static-image
227+
[Setting up your environment]: https://code.visualstudio.com/docs/datascience/jupyter-notebooks#_setting-up-your-environment
207228
[subscription key]: quick-demo-map-app.md#get-the-subscription-key-for-your-account
208229
[Weather Maps Jupyter Notebook repository]: https://github.com/Azure-Samples/Azure-Maps-Jupyter-Notebook/tree/master/AzureMapsJupyterSamples/Tutorials/Analyze%20Weather%20Data
209230
[weather_dataset_demo.csv]: https://github.com/Azure-Samples/Azure-Maps-Jupyter-Notebook/tree/master/AzureMapsJupyterSamples/Tutorials/Analyze%20Weather%20Data/data
231+
[Visual Studio Code]: https://code.visualstudio.com/
232+
[weatherDataMaps.ipynb]: https://github.com/Azure-Samples/Azure-Maps-Jupyter-Notebook/blob/master/AzureMapsJupyterSamples/Tutorials/Analyze%20Weather%20Data/weatherDataMaps.ipynb

0 commit comments

Comments
 (0)