Using a map visualization
- Built-in maps
- Map data formats
- Map elements
- Displaying a map
- Connecting a map to data
- See also
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.
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.
The shapefile is automatically imported into Dundas BI under the Maps folder in the EXPLORE window.
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.
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.
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)
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.
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.
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.
Expand the APPEARANCE section and adjust the From Color and To Color properties.
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.
Go to Properties, click Text, and click Shape Label Settings in order to change the shape label settings in the map.
Click the area under Visible to show the labels of all the shapes in the map.
Click the area under Show Label Only On Elements With Data to hide all the labels of shapes not connected to data.
6.6. Compatible names
In case the data you want to use has column values that cannot be matched against the names of map elements from the shapefile, Dundas BI will attempt to use alternate names. All of the maps built into Dundas BI have a list of alternate names, while uploaded maps will use unique columns from the shape file as sources of alternate names.
If the data does not match the names or the alternate names, you can manually set the compatible name. For example, you are using a map with a shape named United States of America, but your data uses an uncommon name like USofA.
Instead of changing your data or modifying the shapefile, you can manually set the Shape Compatible Name property for the shape element.
Path and symbol elements also have compatible name properties.
6.7. 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.
Drag Sales measure and State/Province dimension to the map visualization.
The color rule is applied to the Montana (USA) map shape.
However, the color rule is also applied to the Montana (Bulgaria) shape.
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.
The color rule is no longer applied to the Montana (Bulgaria) map shape.
6.8. 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.
This section describes other map properties that you may find useful.
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 in the Properties panel if you view the list of shape elements.
Switch to View mode and start zooming in and you will eventually see country-level shapes being loaded in 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.
7.2. Default Viewport Center
By default, Automatic Zooming is enabled, which means the viewport will automatically zoom and center over map resources displaying data. You can disable this behavior by using the Disable Automatic Zooming option in the Properties panel.
The Default Viewport Center property enables you to indicate the default position and zoom level of the viewport when Automatic Zooming is disabled. To activate this option click the plus under the Default Viewport Center option in the Properties panel.
Indicate the X Value, Y Value, and Zoom Level, and then switch to View mode.
8.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.