Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Note
This tutorial is part of a series. For the previous section, see: Tutorial part 7: Detect anomalies on an Eventhouse table.
In this part of the tutorial, you learn how to create a map using geospatial data.
Create a KQL Queryset tab to be used by the map
Open the Tutorial eventhouse that you created in the previous part of the tutorial.
Select the Tutorial_queryset.
Select the + button on the ribbon to create a new tab.
Select the pencil icon on the tab and rename the query tab Show on map.
Copy/paste and run the following query.
TransformedData | where ingestion_time() > ago(30d) | project Street, Neighbourhood, toreal(Latitude), toreal(Longitude), No_Bikes, No_Empty_Docks | summarize sum(No_Bikes), sum(No_Empty_Docks) by Street, Neighbourhood, Latitude, Longitude
Create a Lakehouse and upload GeoJson files
Browse to your workspace and in upper left corner select the + New item button. Then search for and select Lakehouse.
Enter TutorialLakehouse as name.
Select the workspace in which you've created your resources.
Right-click the File node and under Upload, select Upload files.
Download the following two GeoJSON files from the following links and upload them to the Lakehouse.
Create a map
Browse to your workspace and in upper left corner select the + New item button. Then search for and select Map.
Enter TutorialMap in Name, and select Create
Add Eventhouse data to the map
In the Explorer pane, select Eventhouse and select + Add data items and choose the Tutorial eventhouse.
Select Connect.
Under Tutorial, select the Tutorial_queryset.
Select the more menu (...) next to Show on map and select Show on map.
A new window showing data preview of the query opens. Select Next .
Enter BikeLatLong as Name. Select the Latitude and Longitude columns. Under Data refresh interval select 5 minutes. Select Next.
In the next screen, select Add to map.
Right-click on BikeLatLong under Data layers and select Zoom to fit to zoom into London area showing bike stations on the map.
Under General settings, add Street and Neighbourhood under Tooltips.
Under Point settings, toggle Enable series group and select Neighbourhood.
Change Size to By data and select sum_No_Empty_Docks.
This should immediately take effect on the map with bubble sizes representing the number of empty docks and colors representing different neighbourhoods.
Add GeoJSON files from Lakehouse to the map
In the Explorer pane, select Lakehouse and select + Add data items and
Choose the TutorialLakehouse lakehouse and select Connect.
Under TutorialLakehouse, select the london-boroughs.geojson file and right-click on the file and select Show on map. Repeat the step for buckingham-palace-road.json file.
We should see the borough boundaries and Buckingham Palace road on the map. You can toggle visibility of each layer by clicking the eye icon next to each layer under Data layers.
Right-click on buckingham-palace-road under Data layers and select Zoom to fit to zoom into Buckingham Palace road area on the map.
From the menu bar, select the Save icon.
Related content
For more information about tasks performed in this tutorial, see: