Using a map visualization
- Built-in maps
- Map resources
- Displaying a map
- Connecting a map to data
- Using a map
- 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.
2. Built-in maps
The GLOBAL project in Dundas BI includes a set of built-in map resources. You can access these maps from the Maps\Shared sub-folder in your current project.
The built-in maps are categorized into different folders such as Cities, Continents, Countries, and States and Provinces. If your data matches the shapes in these maps, Dundas BI will automatically connect the data to the relevant map categories. If you find what you are looking for in this set of maps, then you do not need to go searching for additional map resources.
On the map visualization, the different categories of the built-in maps are presented in a layer-like manner. You are initially presented with the Continent category, which changes to the Countries category as you zoom in, and from Countries to States/Provinces. This behavior is maintained if you use a multi-level hierarchy and set the Top Level to be different from the Level, which will connect different levels of the hierarchy to different map layers and display them with the relevant zoom level. Using your own map data in Dundas BI is optional, and it stops this automatic behavior.
3. Map resources
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 map resources that 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. A fourth file (.PRJ) may be included with a description of the projection being used, in which case Dundas BI will re-project the coordinates to fit within the boundaries of -180 to 180 longitude and -90 to 90 latitude.
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.
- usa.prj (optional) – A Well-known Text (WKT) description of the projection being used.
3.2. Importing a shapefile
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.
Drag the set of three files from Windows Explorer and drop it over the Explore panel in Dundas BI.
The shapefile is imported into Dundas BI. You can find it under the Maps folder in the Explore panel.
3.3. Map elements
The Map visualization supports three 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 (for an example of displaying city symbols based on latitude and longitude coordinates in the data, see the article Displaying symbols on a map).
4. Displaying a map
Drag the shapefile 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 will see the names of the shapes that were imported from the shapefile.
4.1. Show street level maps
You can connect to a third-party provider to display geographical data underneath the map shapefile.
To start, enable the Show Street Level Maps property.
Select an option from the Map Provider Presets.
The geographical data from the map provider is displayed and the Shape Opacity is set to a default level of 25%, which means you will be able to see the relevant geographical data underneath any shape files and data displayed. You can now switch to View mode and zoom as far as the map provider allows, which is often to the street level.
5. Connecting a map to data
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 (for example, country names)
- a column of numeric values which can be used as a measure (for example, sales figures for each country)
Drag this Excel file from Windows Explorer and drop it onto the Explore panel. This will create a data connector for the Excel file.
Go to the Explore panel and expand the Data Connectors folder. Further expand the auto-generated data connector to see the column structure of the Excel sheet.
5.1. Add data to the map
Drag the Sheet1 data connector item and drop it onto the map control on the canvas.
Dundas BI will automatically connect the available data to the most fitting elements in the map. You can then modify the automatically assigned connections in the Visualization tab of the Data Analysis Panel.
5.2. 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 panel.
Similar name and color options are available for path and symbol elements (see the article Displaying symbols on a map for an example).
5.3. 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.
5.5. 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.
5.6. 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. 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.
The Show Only Requested Maps property forces the map visualization to display only map resources that you've added via dragging from Explore. The built-in world map and its various layers will no longer be loaded or searched for automatically.
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.
You can also remove the property Enable Panning to keep the viewport centered and indicate the Minimum and Maximum Zoom Levels to keep the viewport at a reasonable zoom level.
7.3. Map Projection
The map visualization in Dundas BI supports two types of map projection:
- Equirectangular (default) – This projection is neither equal area nor conformal and is mainly used for thematic mapping.
- Mercator – A conformal map projection that covers the earth from −180° to 180° longitude and 84° north to 84° south latitude.
You can change the map projection in the Layout properties.
- 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 (for example, WGS-84). You can use QGIS to prepare a shapefile with the appropriate CRS before adding it to Dundas BI.