# Visualize location data  > Sketchnote by [Nitya Narasimhan](https://github.com/nitya). Click the image for a larger version. This video provides an introduction to Azure Maps with IoT, a service that will be explored in this lesson. [](https://www.youtube.com/watch?v=P5i2GFTtb2s) > đ„ Click the image above to watch the video ## Pre-lecture quiz [Pre-lecture quiz](https://black-meadow-040d15503.1.azurestaticapps.net/quiz/25) ## Introduction In the previous lesson, you learned how to collect GPS data from your sensors and save it to the cloud in a storage container using serverless code. Now, you'll learn how to visualize those data points on an Azure map. You'll discover how to create a map on a web page, understand the GeoJSON data format, and use it to plot all the captured GPS points on your map. In this lesson, weâll cover: * [What is data visualization](../../../../../3-transport/lessons/3-visualize-location-data) * [Map services](../../../../../3-transport/lessons/3-visualize-location-data) * [Create an Azure Maps resource](../../../../../3-transport/lessons/3-visualize-location-data) * [Show a map on a web page](../../../../../3-transport/lessons/3-visualize-location-data) * [The GeoJSON format](../../../../../3-transport/lessons/3-visualize-location-data) * [Plot GPS data on a Map using GeoJSON](../../../../../3-transport/lessons/3-visualize-location-data) > đ This lesson involves a small amount of HTML and JavaScript. If you'd like to learn more about web development using HTML and JavaScript, check out [Web development for beginners](https://github.com/microsoft/Web-Dev-For-Beginners). ## What is data visualization Data visualization is the process of representing data in ways that make it easier for humans to understand. While it's often associated with charts and graphs, it encompasses any method of visually representing data to help people not only comprehend it better but also make informed decisions. For example, in the farm project, you collected soil moisture readings. A table of soil moisture data recorded hourly on June 1, 2021, might look like this: | Date | Reading | | ---------------- | ------: | | 01/06/2021 00:00 | 257 | | 01/06/2021 01:00 | 268 | | 01/06/2021 02:00 | 295 | | 01/06/2021 03:00 | 305 | | 01/06/2021 04:00 | 325 | | 01/06/2021 05:00 | 359 | | 01/06/2021 06:00 | 398 | | 01/06/2021 07:00 | 410 | | 01/06/2021 08:00 | 429 | | 01/06/2021 09:00 | 451 | | 01/06/2021 10:00 | 460 | | 01/06/2021 11:00 | 452 | | 01/06/2021 12:00 | 420 | | 01/06/2021 13:00 | 408 | | 01/06/2021 14:00 | 431 | | 01/06/2021 15:00 | 462 | | 01/06/2021 16:00 | 432 | | 01/06/2021 17:00 | 402 | | 01/06/2021 18:00 | 387 | | 01/06/2021 19:00 | 360 | | 01/06/2021 20:00 | 358 | | 01/06/2021 21:00 | 354 | | 01/06/2021 22:00 | 356 | | 01/06/2021 23:00 | 362 | For a human, interpreting this data can be challengingâitâs just a wall of numbers. To make it more comprehensible, you could plot it on a line chart:  This visualization can be further improved by adding a line to indicate when the automated watering system was activated at a soil moisture reading of 450:  This chart quickly conveys not only the soil moisture levels but also the points where the watering system was triggered. Charts are just one way to visualize data. IoT devices that monitor weather conditions might use web or mobile apps to display weather data with symbols, such as a cloud for cloudy days or a rain cloud for rainy days. There are countless ways to visualize dataâsome serious, others more playful. â Think about the ways you've seen data visualized. Which methods were the clearest and helped you make decisions the fastest? The best visualizations enable humans to make decisions quickly. For instance, a wall of gauges showing various readings from industrial machinery can be overwhelming, but a flashing red light when something goes wrong allows a person to act immediately. Sometimes, the simplest visualizationâlike a flashing lightâis the most effective. When working with GPS data, the clearest visualization is often plotting the data on a map. For example, a map showing delivery trucks can help workers at a processing plant anticipate when trucks will arrive. If the map also provides information about the trucks' contents, workers can plan accordinglyâe.g., preparing space in a fridge for an incoming refrigerated truck. ## Map services Working with maps is an exciting challenge, and there are many options to choose from, such as Bing Maps, Leaflet, Open Street Maps, and Google Maps. In this lesson, you'll learn about [Azure Maps](https://azure.microsoft.com/services/azure-maps/?WT.mc_id=academic-17441-jabenn) and how it can display your GPS data.  Azure Maps is "a collection of geospatial services and SDKs that use fresh mapping data to provide geographic context to web and mobile applications." It offers developers tools to create interactive maps with features like recommended traffic routes, traffic incident information, indoor navigation, search capabilities, elevation data, weather services, and more. â Try out some [mapping code samples](https://docs.microsoft.com/samples/browse?WT.mc_id=academic-17441-jabenn&products=azure-maps) Azure Maps allows you to display maps in various styles, such as blank canvases, tiles, satellite images, satellite images with roads, grayscale maps, shaded relief maps for elevation, night view maps, and high-contrast maps. You can integrate real-time updates into your maps using [Azure Event Grid](https://azure.microsoft.com/services/event-grid/?WT.mc_id=academic-17441-jabenn). You can also customize the behavior and appearance of your maps by enabling controls for interactions like pinch, drag, and click. To further customize the look, you can add layers such as bubbles, lines, polygons, heat maps, and more. The choice of map style depends on the SDK you use. You can access Azure Maps APIs through its [REST API](https://docs.microsoft.com/javascript/api/azure-maps-rest/?WT.mc_id=academic-17441-jabenn&view=azure-maps-typescript-latest), its [Web SDK](https://docs.microsoft.com/azure/azure-maps/how-to-use-map-control?WT.mc_id=academic-17441-jabenn), or its [Android SDK](https://docs.microsoft.com/azure/azure-maps/how-to-use-android-map-control-library?WT.mc_id=academic-17441-jabenn&pivots=programming-language-java-android) for mobile apps. In this lesson, you'll use the Web SDK to draw a map and display the GPS path of your sensor. ## Create an Azure Maps resource The first step is to create an Azure Maps account. ### Task - create an Azure Maps resource 1. Run the following command in your Terminal or Command Prompt to create an Azure Maps resource in your `gps-sensor` resource group: ```sh az maps account create --name gps-sensor \ --resource-group gps-sensor \ --accept-tos \ --sku S1 ``` This will create an Azure Maps resource called `gps-sensor`. The `S1` tier is a paid tier that includes a variety of features, with a generous number of free calls. > đ To learn about the cost of using Azure Maps, visit the [Azure Maps pricing page](https://azure.microsoft.com/pricing/details/azure-maps/?WT.mc_id=academic-17441-jabenn). 2. You'll need an API key for the maps resource. Use the following command to retrieve this key: ```sh az maps account keys list --name gps-sensor \ --resource-group gps-sensor \ --output table ``` Copy the `PrimaryKey` value. ## Show a map on a web page Next, you'll display your map on a web page. For simplicity, we'll use a single `html` file for this small web app. In a production or team environment, your web app will likely have more components. ### Task - show a map on a web page 1. Create a file called `index.html` in a folder on your local computer. Add HTML markup to hold a map: ```html
``` The map will load in the `myMap` `div`. A few styles ensure it spans the width and height of the page. > đ A `div` is a section of a web page that can be named and styled. 2. Under the opening `` tag, add an external style sheet to control the map display and an external script from the Web SDK to manage its behavior: ```html ``` This style sheet defines how the map looks, and the script file contains code to load the map. Adding this code is similar to including C++ header files or importing Python modules. 3. Below that script, add a script block to initialize the map: ```javascript ``` Replace `