This post has been republished via RSS; it originally appeared at: New blog articles in Microsoft Tech Community.
IoT solutions developers using location data from thousands of devices usually end up with large data sets, presenting them with particular issues. First, when map data is displayed, users have trouble seeing it because there is too much data: pins will be hidden by other pins, overlays will overlay each other, literally. Secondly, large data sets may cause performance issues: you must have experienced slow maps rendering on some platforms when trying to display too much data. The most common way to address these two issues is by clustering—or aggregating data.
Azure Maps offers the ability to cluster large data sets in many different ways so that end users can quickly extract insights from their maps while IoT developers can avoid spending long hours deciphering, filtering and displaying data.
Watch the Channel 9 IoT Show, Point clustering map data with Azure Maps, for some great live demos of Azure Maps clustering capabilities using the SDK samples:
Read on for the basics of how to enable clustering in Azure Maps and for highlights of useful clustering techniques.
Cluster options for radius-based clustering
To use clustering in Azure Maps, you will want to
- set the cluster option on the DataSource class to true,
- set the pixel radius from which nearby points will be combined into a single cluster with clusterRadius,
- set the zoom level that will specify when to disable the clustering logic using the clusterMaxZoom option.
Full documentation for radius-based clustering.
Point clusters in bubble layer
A bubble layer is a great way to render clustered points. You can easily scale the radius and change the color theme based on the number of points in the cluster by using an expression.
Display clusters in a symbol layer
You can also use a symbol layer to display data. Again, the goal is surface insights more easily for the user.
Sometimes you will want to customize the style of clusters based on some metric, like the total revenue of all points within a cluster. Azure Maps offers a cluster aggregates custom properties feature that can be created and populated using an aggregate expression calculation.
The following sample uses an aggregate expression to calculate a count based on the entity type property (grocery store, restaurant, school, etc.) of each data point in a cluster.
Clustered Heat Maps
Heat maps are a great way to display the density of data on the map. This visualization can handle a large number of data points on its own, but it can handle even more data if the data points are clustered and the cluster size is used as the weight of the heat map
Clustered Pie Chart HTML Markers
Clustered Pie Chart HTML Markers use cluster aggregates to surface useful information to the user without them having to even click on them. In this example, pie charts are used to show the number of gas stations, grocery stores, restaurants, and schools.
Demo sample for using Pie Chart HTML Markers.