TMap

a drilldownable thematic map visual with linked polygon layers
for Power BI

Add Linked Polygon Layer

Add 2 tables to Power BI data model. One table contains geographic coordinates: Longitude and Latitude; another table contains polygon data in WKT (Well-Known Text) format.

Link 2 tables by common field as below:
If these 2 tables are not related, an error will be shown as below:
The visual will verify the validity of WKT objects. If some WKT objects are invalid, the warning message will be shown in the bottom of the visual.

You need to find why they are invalid, and fix them. One reason I found was that WKT string was truncated to 32766 characters when loading from csv file. Reducing number of points in a polygon will avoid the problem and improve performance.

2. Add WKT data to the TMap Visual

Drag WKT data from Data Fields pane to the bucket "WKT for Linked Layer" shown as below:

3. Select one or more polygons to show on the map

Select an item from the dropdown list and the marker layer and ploygon layer will be shown as below:

Create Thematic Maps

1. Proportional Symbol Map

Drag a data column with numeric data type to the "Size" bucket in the build visual pane, add "Latitude", "Longitude" and/or WKT data to the TMap visual, and choose the symbol type as "star" in the format pane, a proportional symbol map will be created as below:
TMap

You can change symbol type, color, size and transparency in the "Symbol" section of the format pane.

2. Pie Chart Symbol Map

Drag multiple data columns with numeric data type to the "Size" bucket in the build visual pane, add "Latitude", "Longitude" and/or WKT data to the TMap visual, a pie chart symbol map will be created as below:
TMap

You can adjust pie chart size and transparency in the "Symbol" section of the format pane. Please note that if you add a data column to the field "Legend", it will become "Categorical Color Map".

3. Bar Chart Symbol Map

Drag multiple data columns with numeric data type to the "Size" bucket in the build visual pane, add "Latitude", "Longitude" and/or WKT data to the TMap visual, and change the chart type as "Bar Chart" in the "Symbol" section of the format pane, a bar chart symbol map will be created as below:
TMap

You can adjust bar chart size and transparency in the "Symbol" section of the format pane. If you turn on "Same Scale - Y Axis" in the format pane, all bar charts in the map will have the same scale in the Y axis and you can compare them. Otherwise, each bar chart has its own scale in the Y axis, you can't compare the bar height across different bar charts.

4. Donut Chart Symbol Map

Drag multiple data columns with numeric data type to the "Size" bucket in the build visual pane, add "Latitude", "Longitude" and/or WKT data to the TMap visual, and change the chart type as "Donut Chart" in the "Symbol" section of the format pane, a donut chart symbol map will be created as below:
TMap

Total amount will be shown in the inner circle of donut chart if it fit in. You can adjust donut chart size and trun on "Same Size" in the format pane to show all these labels for total amount.

5. Stacked Bar Chart Symbol Map

Drag multiple data columns with numeric data type to the "Size" bucket and one column to the "Legend" bucket in the build visual pane, add "Latitude", "Longitude" and/or WKT data to the TMap visual, a stacked bar chart symbol map will be created as below. If the type of the column in the bucket "Legend" is numeric, please change it as text in the Data view in Power BI Desktop.
TMap

You can adjust stacked bar chart size and transparency in the "Symbol" section of the format pane. If you turn on "Same Scale - Y Axis" in the format pane, all stacked bar charts in the map will have the same scale in the Y axis and you can compare them. Otherwise, each stacked bar chart has its own scale in the Y axis, you can't compare the bar height across different bar charts.

6. Graduated Color Map

Drag a data column with numeric data type to the "Legend" bucket in the build visual pane, add "Latitude", "Longitude" and/or WKT data to the TMap visual, a graduated color map will be created as below:
TMap

You can adjust symbol color, size and transparency in the "Symbol" section of the format pane.

7. Categorical Color Map

Drag a data column with string data type to the "Legend" bucket in the build visual pane, add "Latitude", "Longitude" and/or WKT data to the TMap visual, a categorical color map will be created as below:
TMap

You can adjust symbol size and transparency in the "Symbol" section of the format pane.

8. Filled Map

Drag a data column with string data type to the "Legend" bucket in the build visual pane, add WKT data to the TMap visual and leave the fields "Latitude" and "Longitude" empty, a filled map will be created as below:
TMap

Please note that the polygon will be colored based on first category if there are many categories in one polygon.

9. Choropleth Map

Drag a data column with numeric data type to the "Legend" bucket in the build visual pane, add WKT data to the TMap visual and leave the fields "Latitude" and "Longitude" empty, a choropleth map will be created as below:
TMap

You can turn off or turn on "smart gradient" in the format pane to match 2 colors or 3 colors with data values in order to make insightful choropleth map.
Please aggregate (Sum, Average, Count, etc.) the quantity in the the bucket "Legend". Otherwise the polygon will be colored based on first quantity if there are many quantity data in one polygon.

Show Legend

Set "Legend" in the format pane as on, the legend foe above map types will be shown on the map as below
TMap

Add Labels

Drag a data item to the "Label" bucket in the build visual pane, then labels will be shown on the map as below: TMap
You can change label color, text size, font and background in the format pane.
TMap
In order to avoid overlaping of labels on the map, you can set up visible zoom range in the format pane. A map control will help you to decide current zoom level of the map.
TMap
Tips: The larger "Visible from Zoom level" is set, the less chance labels overlap.

Cluster Symbols by the Polygon Layer

Drag a data column or multipe data columns to the "Size" bucket in the build visual pane, change the Longitude/Latitude fields to the aggregation "Average" or leave them empty, circle symbols or pie charts will be clustered by the polygon layer.

The following map shows pie chart of visible minorities for each census metropolitan area (CMA) in Canada before clustering: TMap
The following map shows pie chart of visible minorities for each province in Canada after clustering: TMap
When the Longitude/Latitude fields are empty, symbols will be positioned by using the centre of polygons.

Drill Down Thematic Maps

1. Drill Down Donut Chart Map by Geonames

After having created a donut chart map, you can add a hierarchy of geographic names to the bucket "Label for Linked Layer" to drill down it. Before drilling down, please also check if metrics in the "Legend" or "Size" bucket are aggregated. Please try it on the demo below by setting the drilldown mode and clicking a polygon.


Please note that you need to add geographic names in the order from the top level to the lower level. While drilling down by geographic names, the number of polygons is recommended to be less than 500 for the best performance.

2. Drill Down Donut Chart Map by WKT Layers

After having created a donut chart map, you can add a hierarchy of WKT polygon layers to the bucket "WKT for Linked Layer" to drill down it. Please try it on the demo below by setting the drilldown mode and clicking a polygon.


Please note that you need to add WKT polygon layers in the order from the top level to the lower level.

3. Drill Down Choropleth Map by Geonames

After having created a choropleth map, you can add a hierarchy of geographic names to the bucket "Label for Linked Layer" to drill down it. Optionally you can add aggregated metrics values to the choropleth map by turning on "Label Amount" in the "Linked Polygon Layer" section of the format pane. Please try it on the demo below by setting the drilldown mode and clicking a polygon.


Please note that you need to add geographic names in the order from the top level to the lower level. if calculated metrics such as GDP Per Capita are aggregated in drilling down, you need to use the role "Calculation" and the formula in the "Aggregation" section of the format pane.

4. Drill Down Choropleth Map by WKT Layers

After having created a choropleth map, you can add a hierarchy of WKT polygon layers to the bucket "WKT for Linked Layer" to drill down it. Please try it on the demo below by setting the drilldown mode and clicking a polygon.


Please note that you need to add WKT polygon layers in the order from the top level to the lower level.

5. Drill Down Pie Chart Map by WKT Layers

After having created a pie chart map, you can add a hierarchy of WKT polygon layers to the bucket "WKT for Linked Layer" to drill down it. Please try it on the demo below by setting the drilldown mode and clicking a polygon.


Please note that you need to add WKT polygon layers in the order from the top level to the lower level.

6. Drill Down Bar Chart Map by WKT Layers

After having created a bar chart map, you can add a hierarchy of WKT polygon layers to the bucket "WKT for Linked Layer" to drill down it. Please try it on the demo below by setting the drilldown mode and clicking a polygon.


Please note that you need to add WKT polygon layers in the order from the top level to the lower level.

7. Drill Down Stacked Bar Chart Map by WKT Layers

After having created a stacked bar chart map, you can add a hierarchy of WKT polygon layers to the bucket "WKT for Linked Layer" to drill down it. Please try it on the demo below by setting the drilldown mode and clicking a polygon.


Please note that you need to add WKT polygon layers in the order from the top level to the lower level.

Show Map Without Base Map Tiles

In the TMap Visual, You can show map without base map tiles.
Set up Base Map as "No Base Map" in the format pane, the TMap visual will not show base map tiles as below: TMap
By doing this, you can view the map even without internet access if you deploy the TMap visual to Power BI report server on premise. Then it can help protecting your data's safety and security better.

Multi-pane Card

In the Multi-pane Card Visual, drag a few data columns to each "Card Pane" bucket in the build visual pane, a multi-pane card will be created as below:
Multi-pane Card
In the "cards" section of the format pane, you can change the layout for label and value from "Vertical" to "Horizontal", then the card will be shown as following:
Multi-pane Card in Horizontal
The user can select the direction and column to sort data from the more options menu, and top n rows will be shown:
Multi-pane Card Sort Data
You can collapse and extend a pane by clicking a pane title. You can also customize text font, size and colors for pane titles, labels and values in the format pane.