Using custom point or region information from Mapbox in a map visualization in a report

When you use a map in a report, you can use custom point or region information from Mapbox in a map. You can use an extra layer on a map to display additional information. For example, a time-zone layer.

Before you begin

To use the vector maps from Mapbox as location measures in your map visualization, use a data source that contains region or point data. An example of a table with point or region data is the following table:
Table 1. Table with point and region data
City Population Timezone Timezone offset TZ
Andorra la Vella 20430 Europe/Andorra 1 UTC+01:00
Abu Dhabi 603492 Asia/Dubai 4 UTC+04:00
The tileset that Mapbox generates has the following properties:
  • Custom map ID
  • Custom layer name
  • Custom property name

Procedure

  1. Create a Mapbox account.
  2. Upload your geoJSON file to Mapbox.
    Important: Before you upload any geoJSON file, ensure that its polygon properties do not contain any sensitive information.
  3. In Mapbox, create a tileset based on the geoJSON file.
  4. In IBM® Cognos® Analytics click New and then click Report.
  5. In the Templates and themes window, click Blank and then click OK.
  6. On the canvas, click the Data icon Data icon, and then click Visualization.
  7. In the Visualization gallery, click Map, and then click OK.
  8. In the left pane, click the Add report data icon Add report data icon, select report data that contains region or point data.
  9. On the data slot pane, click the down arrow and select:
    • Regions, if you want to use region data from Mapbox.
    • Points, if you want to use point data from Mapbox.
  10. In the left pane, expand your data items and drag either point or region data to the Location data slot.
  11. Note: Make sure you use the correct casing for the Mapbox properties.
    Depending on whether you want to use Mapbox region or point data, specify the following properties. These properties are part of the Mapbox map. You must obtain the values of the properties from the Mapbox map creator.
    From the Properties pane under REGIONS, specify the following properties:
    Option Description
    Region custom map id The Mapbox unique map ID.
    Region custom layer name The layer name that is used in the Mapbox map.
    Region custom property name The custom property name that you want to use from the Map box map.
    From the Properties pane under POINTS, specify the following properties:
    Option Description
    Point custom map id The Mapbox unique map ID.
    Point custom layer name The layer name that is used in the Mapbox map.
    Point custom property name The custom property name that you want to use from the Map box map.
  12. Drag measurable data to the Color data slot.
    For example, use population.
  13. Click Run options > Run HTML.
  14. Click Close.

Example

An example of a map visualization with a region layer that shows the population for each time-zone. The layout of the time-zones is defined in a Mapbox map.
A map visualization with a region layer that shows the population for each time-zone.