Example: Adding regions and points to a map

This example explains how to show regions and points data on a map.

Before you begin

You must have access to the IBM® Cognos® Analytics base samples. If your administrator installed these samples, they are in Team content > Samples > Data.

About this task

This procedure shows you how to create a map that shows revenue by country and quantity as points. To see how to add latitude and longitude data to a map, see Example: Adding latitude and longitude data to a map.

Procedure

Create the map and add a regions layer that shows revenue by country.

  1. Click New and then click Report.
  2. In the Templates and themes window, click Blank and then click OK.
  3. On the canvas, click the Pinned icon pinned items icon, and then click Visualization.
  4. In the Visualization gallery, click Map, and then click OK.
  5. In the navigation pane, click Select sources or the Add a source icon pinned items icon, select Team content > Samples > Data > Sample data module and click Open.
  6. Make sure that Regions displays in the data slot pane. If it doesn't, click the down arrow and select it.
  7. Expand Sample File Go Sales Xls and drag Retailer country to the Locations data slot.
  8. Drag Revenue to the Location color data slot.
  9. In the Properties pane, under REGIONS, set Transparency to 10.
  10. Optionally, under COLOR PALETTE, set a color palette for the Regions property.
  11. Select Page preview to run the report.
    Note: You can also click Run options > Run HTML to run the report.
    The map is populated.
    Tip: Zoom in and zoom out of the map to see more or less detail. Click and drag to move around the map.

    Notice that the Visible layers visible layers icon icon displays on the map. When you click it, Regions is selected, which means that region data is displayed on the map. You can hide the region data by clearing the Regions check box.

  12. Select Page design to return to page design mode. If you ran the report from Run options, close the tab, which returns you to page design mode.

Now add quantity as a points layer on the map.

  1. In the data slot pane, click the down arrow and select Points.
  2. Drag Retailer country to the Locations data slot.
  3. Drag Quantity to the Point size data slot.
  4. Make sure that the visualization is selected on the canvas, and in the Properties pane, under POINTS, in the Type field, select Heat.
  5. You can set a color palette and transparency for the points layer, like you did for the regions layer.
  6. Select Page preview to run the report.
    The map refreshes with the new points data. Now, when you click the Visible layers visible layers icon icon, the Points check box displays, along with the Regions check box. You can clear one or both to show or hide the data. Also, the points data appear as heat points on the map.
  7. Save the report when you're done.