Using a map visualization

Contents[Hide]

1. Overview

You use maps to display geographic information in the form of shape, path, and symbol elements. Then you connect these elements to data so that their appearance will change based on data values.

Related video: Introduction to Maps

2. Built-in maps

The GLOBAL project in Dundas BI includes a set of built-in map resources which have already been imported. You can access these maps from the Maps\Shared subfolder in your current project.

The built-in maps are categorized into different folders such as Cities, Continents, Countries, and States and Provinces. If you find what you are looking for in this set of maps, then you don't need to go searching for map data.

Maps included with Dundas BI
Maps included with Dundas BI

The map visualization in Dundas BI automatically loads built-in map resources as needed by default, such as when you're zooming in to see more detail. Thus, bringing in your own map data into Dundas BI is optional. The next section describes the format that is supported in case you do want to use your own map data.

3. Map data formats

3.1. ESRI shapefile

The ESRI (Environmental Systems Research Institute) shapefile format is a popular binary file format for storing vector map data and is used by many of the public domain maps which you can acquire through the internet.

A single ESRI shapefile is actually composed of three separate files: a main (.SHP) file containing geographic data, an index (.SHX) file containing record information, and a database file containing data associated with the geometry elements stored within the SHP file. For example, a map of the United States might be represented by the following files:

  • usa.shp - Main shapefile which contains definitions for one layer of geometry elements (either polygons, polylines, or points).
  • usa.shx - Index file containing information about how to read the shape data from the SHP file.
  • usa.dbf - DBF (dBASE) file which defines a database table of attribute values. Contains one record (or row) per geometry element.

4. Map elements

The Map visualization supports 3 types of map elements:

  • Shapes - Show political boundaries of continents, countries, states, provinces, and regions.
  • Paths - Display roads, streets, highways, or other linear features such as rivers.
  • Symbols - Represent location points on a map such as a city or state capital and can be generated dynamically from data.

5. Displaying a map

5.1. Drag a shapefile to EXPLORE

For this example, create a new dashboard from the main menu using the Blank dashboard template.

If you downloaded shapefile data in the form of a ZIP file, you'll need to extract the contents to an actual folder in Windows first.

Locate your shapefile in Windows Explorer (it consists of 3 files).

Drag the set of 3 files from Windows Explorer and drop it over the EXPLORE window in Dundas BI.

Drag shapefile (3 files) to EXPLORE window (using Chrome browser)
Drag shapefile (3 files) to EXPLORE window (using Chrome browser)

The shapefile is automatically imported into Dundas BI under the Maps folder in the EXPLORE window.

Shapefile is added to the Maps folder
Shapefile is added to the Maps folder

5.2. Drag map to the canvas

Next, make sure you are in Edit mode.

Drag the newly added map from the Maps folder to the dashboard canvas.

Drag map to dashboard canvas
Drag map to dashboard canvas

Select the map control on the canvas, go to PROPERTIES, and then click the Shapes property. You'll see the names of the shapes that were imported from the shapefile.

Map shape collection
Map shape collection

6. Connecting a map to data

6.1. Drag an Excel file to EXPLORE

Consider an Excel file that contains two columns of data:

  • a column of text values which can be matched against the names of map elements from the shapefile (e.g., country names)
  • a column of numeric values which can be used as a measure (e.g., sales figures for each country)

Excel data for connecting to a map
Excel data for connecting to a map

Drag this Excel file from Windows Explorer and drop it onto the EXPLORE window. This will automatically create a data connector for the Excel file.

Go to the Explore window and expand the Data Connectors folder. Further expand the auto-generated data connector to see the column structure of the Excel sheet.

6.2. Add data to the map

Drag the Sheet1 data connector item and drop it onto the map control on the canvas.

Drag Sheet1 to the map control
Drag Sheet1 to the map control

Each shape that is connected to data is assigned a specific color that corresponds to its data value (e.g., Sales measure value).

6.3. Visualization tab

Open the Data Analysis Panel for the map, click Visualization, and click the "More" button, if available.

Map visualization options
Map visualization options

Map visualization options
Map visualization options

The SHAPE NAME option specifies how the matching is done between shape elements and the data from the underlying metric set. In this case, the shape name is connected to the Country hierarchy from the Excel data.

The SHAPE COLOR option indicates the color of the shapes is connected to the Sales measure. You can customize the actual assignment of colors using shape color rules via the PROPERTIES window.

Similar name and color options are available for path and symbol elements.

6.4. Color rules

Select the map control, go to PROPERTIES, click Look, and then modify the default Auto Color Rule in order to change the colors of the shapes in the map. 

Auto color rule for shapes
Auto color rule for shapes

Expand the APPEARANCE section and adjust the From Color and To Color properties.

Changing the From and To colors
Changing the From and To colors

It is possible to add multiple shape color rules, but note that they will be applied in order from first to last. This means the last color rule takes precedence.

Separate color rules are also available for path and symbol elements.

6.5. Compatible Names

What if the data you want to use has column values that can't be matched against the names of map elements from the shapefile? For example, you imported a map with a shape named United States of America, but your Excel data uses country names like United States.

Instead of changing your data or modifying the shapefile, you can manually set the Shape Compatible Name property for any shape element. These compatible names will then be used for connecting shapes to data.

Edit properties for a shape and use the Shape Compatible Name property to give it an alternate name for connecting to data
Edit properties for a shape and use the Shape Compatible Name property to give it an alternate name for connecting to data

Path and symbol elements also have compatible name properties.

6.6. Using additional data for context

Additional context is necessary when there are multiple locations on the map with the same name. If you have another column, hierarchy, or hierarchy level that can help distinguish between these locations, you can connect to it to provide the additional context.

For example, if your data includes the state of Montana, USA, but the map also shows the province of Montana, Bulgaria, the color rule will be applied to both map shapes. You can distinguish between the two shapes using additional context by adding another column (Country) to the CONTEXT field. Refer to the sample below.

Sample data
Sample data

Drag Sales measure and State/Province dimension to the map visualization.

Drag measure and dimension
Drag measure and dimension

The color rule is applied to the Montana (USA) map shape.

Montana (USA)
Montana (USA)

However, the color rule is also applied to the Montana (Bulgaria) shape.

Montana (Bulgaria)
Montana (Bulgaria)

In order to resolve this issue, the Country column should be connected to the CONTEXT field. Open the Data Analysis Panel for the map and click Visualization.

Drag the Country column to the CONTEXT field.

Connect Country to CONTEXT
Connect Country to CONTEXT

The color rule is no longer applied to the Montana (Bulgaria) map shape.

Note
If the additional context is another level of the hierarchy being used in the Name field, you can apply it by changing the Top Level of the hierarchy instead of connecting it to the CONTEXT field. You can set the Top Level of the hierarchy in the Data Analysis Panel by editing the hierarchy, or simply drag the level from the explore panel.

7. Using a map

Once your design is complete, go to the toolbar and click View.

In View mode, you can:

  • Zoom in or zoom out on the map by using the mouse wheel.
  • Pan the map by clicking and dragging it in any direction.
  • Hover over a shape on the map to view its corresponding tooltip (which shows the connected data values).

Note that zoom or pan changes that you make in View mode will persist even when you switch back to Edit mode.

Using a map in View mode
Using a map in View mode

8. Properties

This section describes other map properties which you may find useful.

8.1. Show Only Requested Maps

By default, when you add a map visualization from the Data Visualization toolbar, some built-in map resources (such as Continents) will be loaded automatically. You can see this if you go to PROPERTIES and view the list of shape elements.

Default map automatically loads continent shapes
Default map automatically loads continent shapes

Next, switch to View mode and start zooming in and you'll eventually see country-level shapes being loaded in automatically as well.

While this behavior makes it easy to get started with maps, in some cases, you just want to display a map of a single country or state, without all of the surrounding geography. To do this, use the Show Only Requested Maps property to force the map visualization to display only the map resources that you've added via dragging from EXPLORE. The built-in world map and country-level data will no longer be loaded or searched for automatically which should also help improve display performance.

As an example, suppose you have a shapefile of Egypt and you only want to display its map and not any surrounding countries. First, add the shapefile as a map resource by dragging it from Windows Explorer to EXPLORE. Then drag the map resource onto the dashboard designer canvas. The map data for Egypt is displayed along with the rest of the world map.

Drag the map resource to the canvas
Drag the map resource to the canvas

Next, switch to View mode and zoom in and pan the map until Egypt fills up most of the control.

Go back to PROPERTIES and check the Show Only Requested Maps property.

Show Only Requested Maps property
Show Only Requested Maps property

Switch to View mode and you'll see just the map of Egypt without any surrounding content.

Map shows only Egypt
Map shows only Egypt

9. Notes

9.1. Coordinate Reference System for ESRI shapefiles

If you have a shapefile that does not import correctly into Dundas BI, check the coordinate reference system (CRS) of the shapefile using a third-party application such as QGIS. This tool lets you check the CRS of a shapefile and also save/export it as a new shapefile with a different CRS (e.g., WGS-84). You can use QGIS to prepare a shapefile with the appropriate CRS before adding it to Dundas BI.

10. See also

Dundas Data Visualization, Inc.
500-250 Ferrand Drive
Toronto, ON, Canada
M3C 3G8

North America: 1.800.463.1492
International: 1.416.467.5100

Dundas Support Hours: 7am-6pm, ET, Mon-Fri