Map Chart

Watch Video: Create a Custom Map (Create a Built-In Map)

This video might show an earlier version of the feature or operation that differs in minor ways from the current version.

You can use maps to display data either based on regional information (country, state, city, etc.) or based on latitude and longitude. For information on creating maps with user-defined regions, see Create a Custom Map in Manage the Server.

Display Data by Region

To display data on a map by region (state, city, zip code, etc.), follow the steps below:

If you are new to charting, see the following sections first:

Configure Your Data…​

The data source for the chart (data block or data model) should represent dimensions and measures as independent columns or fields, as shown below. See Prepare Your Data for information on how to manipulate your data, if it is not currently in this form. (Note: A properly designed data model will already have the correct structure.)

dataStructureCharts

In some cases (e.g., Pie Chart), you may want your data to provide just a single measure. In other cases (e.g., Line Chart), you may want the data to supply multiple measures. If the data does not provide the correct number of measures, you may be able to alter the number of measures to suit the needs of the chart by “pivoting” or “unpivoting” the data. See Pivot Data in Prepare Your Data for more information about this procedure.

Open a Chart for Editing…​
Watch Video: Create a Chart (Open the Chart Editor)

This video might show an earlier version of the feature or operation that differs in minor ways from the current version.

Follow the steps below to get started with a new Chart. See Basic Charting Steps for more details.

  1. If necessary, create a new Dashboard. (See Create a New Dashboard.)

  2. From the Toolbox panel, drag a Chart component into the Dashboard.

    addingChart

  3. Resize the Chart as desired by dragging the handles.

    resizeChartHandle 1

  4. Press the ’Edit’ button in the center of the Chart or press the ‘Edit’ button edit in the top-right corner.

    ChartEditButton

    This opens the same Visualization Recommender available for creating a new Dashboard. (See Create a New Dashboard.)

  5. To bypass the Recommender, press the ‘Full Editor’ button edit at the top right to open the Chart Editor.

    ChartEditorIntro

  1. Press the ‘Select Chart Style’ button auto chart type. Choose the ‘Map’ style. Press the ‘Apply’ button submit (or double-click the ‘Map’ icon).

    MapChartType 1

    The Chart Editor now provides a ‘Geographic’ field.

  2. Optional: If you want to use a web map background (Mapbox map or Google Map, depending on what your administrator has configured), follow the steps below:

    The Mapbox and Google Map APIs impose restrictions on the size of a map. If you see an error when you attempt to display the map background, resize the Chart to a smaller width.
    1. Right-click the Chart and select ‘Properties’. This opens the ‘Chart Properties’ dialog box.

      webMap1

    2. Under the Advanced tab, enable ‘Use Web Map as Background’ and press OK. (If this option is not available, ask your administrator to enable the Web Map feature.)

      Report Ad Hoc Chart Map4

    3. Optional: If your geographical field represents areas on the Chart (e.g., states) rather than points (e.g., cities), adjust the ‘Alpha’ setting to less than 100% so that the filled regions do not obscure the underlying map background.

    4. Press OK to exit the ‘Chart Properties’ dialog box.

  3. Mark the dimensions you want to use on the map as geographical fields. To do this, see Set a Geographical Field.

    What is a dimension?

    A dimension is used to break-down the dataset into multiple groups, often within a Crosstab, Chart, or Selection List. Adding a dimension to the ‘X’ region of a Chart distinguishes the different dimension groups by location on the X-axis. Adding a dimension to the ‘Y’ region distinguishes the different dimension groups by location on the Y-axis. You can add multiple dimensions into the ‘X’ or ‘Y’ regions of a Chart, or into the ‘Rows’ or ‘Columns’ regions of a Crosstab, to create multiple grouping levels. You can also distinguish groups in a dimension by using color, shape, size, or label in a Chart.

  4. From the Data Source panel in the Chart Editor, drag a geographic dimension onto the ‘Geographic’ field in the Chart Editor.

    bindGeographicField

    The chart updates to display the locations contained in the geographic field.

  5. Repeat the previous step to bind additional ‘Geographic’ levels. For example, you can bind ‘City’ and ‘State’ fields.

    bindGeographicFieldStateCity 1

  6. From the Data Source panel, drag a measure onto one of the ‘Color’, ‘Shape’, ‘Size’, or ‘Text’ regions.

    What is a measure?

    A measure is generally used for aggregation, for example summation, averaging, correlation, etc., within a Crosstab, Chart, Text component, or Gauge. Adding a measure to the ‘Y’ region in a chart displays the computed aggregates by using locations on the Y-axis. Adding a measure to the ‘X’ region displays the computed aggregates by using locations on the X-axis. You can also display aggregates by using color, shape, size, or label.

    bindGeographicFieldVisual 1

    This displays the measure on the chart using the visual coding you selected (color, shape, or size), and automatically creates a corresponding legend.

  7. Press the ‘Edit Measure’ button measure setting, and select the desired aggregation method for the measure.

    bindGeographicFieldSetAgg

  8. Optional: For any geographical fields that you specified, press the ‘Edit Dimension’ button dimension setting, and select the desired ranking for the geographical data. For example, you can display just the top three states according to the measure.

    bindGeographicFieldRanking 1

  9. Optional: To create a particular trajectory through the points on the chart, drag a path field to the ‘Path’ region. The values of this field are used to assign the sort order for the plotted data so that connecting lines are drawn between points that are adjacent in the path sort order.

    If your data set contains map data points in separate columns (such as origin and destination columns), you should combine these into a single column.
  10. Press the ‘Finish’ button submit to close the Editor.

  11. Optional: Set the initial map view by selecting a region, and pressing the ‘Zoom Chart’ button zoom in.

    bindGeographicZoom 1

    You can also press the ‘Pan’ button move and drag the map to reposition, and press the ‘Zoom In’ button zoom in or ‘Zoom Out’ button zoom out to zoom. Press the ‘Clear’ button home to reset the view.

    MapChartType 4

Display Data by Latitude and Longitude

To learn how to display data on a map by latitude and longitude, follow the steps in the walk-through below.

Walkthrough: Latitude and Longitude

In this example, you will label a map with a list of landmarks along Historic Route 66. The locations of the landmarks are provided by the ‘Map Points’ Data Worksheet data block, which contains raw latitude and longitude data.

Follow the steps below:

If you are new to charting, see the following sections first:

Configure Your Data…​

The data source for the chart (data block or data model) should represent dimensions and measures as independent columns or fields, as shown below. See Prepare Your Data for information on how to manipulate your data, if it is not currently in this form. (Note: A properly designed data model will already have the correct structure.)

dataStructureCharts

In some cases (e.g., Pie Chart), you may want your data to provide just a single measure. In other cases (e.g., Line Chart), you may want the data to supply multiple measures. If the data does not provide the correct number of measures, you may be able to alter the number of measures to suit the needs of the chart by “pivoting” or “unpivoting” the data. See Pivot Data in Prepare Your Data for more information about this procedure.

Open a Chart for Editing…​
Watch Video: Create a Chart (Open the Chart Editor)

This video might show an earlier version of the feature or operation that differs in minor ways from the current version.

Follow the steps below to get started with a new Chart. See Basic Charting Steps for more details.

  1. If necessary, create a new Dashboard. (See Create a New Dashboard.)

  2. From the Toolbox panel, drag a Chart component into the Dashboard.

    addingChart

  3. Resize the Chart as desired by dragging the handles.

    resizeChartHandle 1

  4. Press the ’Edit’ button in the center of the Chart or press the ‘Edit’ button edit in the top-right corner.

    ChartEditButton

    This opens the same Visualization Recommender available for creating a new Dashboard. (See Create a New Dashboard.)

  5. To bypass the Recommender, press the ‘Full Editor’ button edit at the top right to open the Chart Editor.

    ChartEditorIntro

  1. Create a new Dashboard based on the ‘Map Points’ Data Worksheet. (See Create a New Dashboard.)

    The ‘Map Points’ Data Worksheet can be found in Data Worksheet  Examples. You may need to download the examples.zip file from GitHub into your environment. (This requires access to Enterprise Manager.) See Import and Export Assets for instructions on how to import.
  2. Press the ‘Select Chart Style’ button auto chart type. Choose the ‘Map’ style. Press the ‘Apply’ button submit (or double-click the ‘Map’ icon).

    MapChartType 1

    The Chart Editor now provides a ‘Geographic’ field.

  3. Optional: If you want to use a web map background (Mapbox map or Google Map, depending on what your administrator has configured), expand the section below:

    Use Web Map…​
    1. Right-click the Chart and select ‘Properties’. This opens the ‘Chart Properties’ dialog box.

      MapChartType 2

    2. Under the Advanced tab, enable ‘Use Web Map as Background’ and press OK. (If this option is not available, ask your administrator to enable the Web Map feature.)

      MapChartType 3

    3. Optional: If your geographical field represents areas on the Chart (e.g., states) rather than points (e.g., cities), adjust the ‘Alpha’ setting to less than 100% so that the filled regions do not obscure the underlying map background.

    4. Press OK to exit the ‘Chart Properties’ dialog box.

      The Mapbox and Google Map APIs impose restrictions on the size of a map. If you see an error when you attempt to display the map background, resize the Chart to a smaller width.
  4. In the Data Source panel, right-click the ‘Lat’ measure or press the ‘Actions’ button menu horizontal, and select ‘Set Geographic’ from the context menu.

    The ‘Lat’ field contains latitude values.

    Map Chart LongLat SetGeo

    This opens the ‘Edit Geographic’ dialog box. If you need to open the ‘Edit Geographic’ dialog box later, right-click the ‘latitude’ measure or press the ‘Actions’ button menu horizontal, and select ‘Edit Geographic’ from the context menu.

  5. From the ‘Map’ menu, select ‘U.S.’, and press OK.

    Map Chart LongLat US

    If you are using a Web Map background with latitude and longitude data, you should always use the ‘World’ map option.
  6. Repeat the above steps to set the ‘Long’ measure as a geographic field.

  7. Drag the ‘Long’ field to the ‘X’ region.

    The ‘Long’ field contains longitude values.
  8. Drag the ‘Lat’ field to the ‘Y’ region.

    Map Chart LongLat BindGeo

    Data points now appear on the map to mark the locations specified by the latitude and longitude data, outlining Historic Route 66.

  9. From the Data Source panel, drag a measure onto one of the ‘Color’, ‘Shape’, ‘Size’, or ‘Text’ regions.

    What is a measure?

    A measure is generally used for aggregation, for example summation, averaging, correlation, etc., within a Crosstab, Chart, Text component, or Gauge. Adding a measure to the ‘Y’ region in a chart displays the computed aggregates by using locations on the Y-axis. Adding a measure to the ‘X’ region displays the computed aggregates by using locations on the X-axis. You can also display aggregates by using color, shape, size, or label.

    This displays the measure on the chart using the visual coding you selected (color, shape, or size), and automatically creates a corresponding legend.

  10. Press the ‘Edit Measure’ button measure setting, and select the desired aggregation method for the measure.

    bindGeographicFieldSetAgg

  11. To add the landmark labels to the points on the map, drag the ‘Name’ field from the Data Source panel to the ‘Text’ field.

    Map Chart LongLat NameLabel

    The labels appear fairly crowded because of the long landmark names. You can zoom the chart to see the labels more clearly. (See below.)

    By default, the landmark names are displayed as tooltips.
  12. Optional: Set the initial map view by selecting a region, and pressing the ‘Zoom Chart’ button zoom in.

    MapChartType 6

    You can also press the ‘Pan’ button move and drag on the map to reposition, or press the ‘Zoom In’ button zoom in or ‘Zoom Out’ button zoom out to zoom. Press the ‘Clear’ button home to reset the view.

    MapChartType 5

  13. Press the ‘Finish’ button submit to close the Editor.

Set a Geographical Field

To mark a field as geographical, follow these steps:

  1. Right-click the field in the tree or press the ‘Actions’ button menu horizontal, and select ‘Set Geographic’ from the context menu. This places a location icon geo field next to the field name.

    setGeographic

    If the field is shown with a location icon geo field, this means the field has been already been mapped to a geographical level. If the field is shown with an unmapped location icon geo not mapped, this means you may need to set the geographical level for the field or resolve location names.

  2. To set the geographical level, right-click the field name and select ‘Edit Geographic’ from the context menu. This opens the ‘Edit Geographic’ dialog box.

    editGeographic1

  3. In the ‘Edit Geographic’ dialog box, select the desired region from the ‘Map’ menu: Asia, Canada, Europe, Mexico, U.S., or World.

    The map that you select for a geographic field applies to all other geographical fields.
  4. From the ‘Layer’ menu, select the geographical layer that corresponds to the data in the selected field.

    This specifies the layer of the geographical database against which field values should be matched (e.g., city names should be matched against the city layer, etc.). The options available in the ‘Layer’ menu depend on the previously selected ‘Map’ option.

  5. From the ‘Mapping’ menu, select the desired map database. (This is almost always ‘Built-in’.) The Chart Editor attempts to resolve values in the selected geographic field against the corresponding layer in the map database.

    If the field was shown with an unmapped location icon geo not mapped, this means you may need to resolve location names. To do this, follow the steps below:

    1. Press the ‘Edit’ button edit next to the ‘Mapping’ menu. This opens the ‘Geographic Mapping’ dialog box, which allows you to manually match place names.

    2. Select an unmatched location in the left panel, and choose the correct match from the right panel. Use the ‘Algorithm’ and ‘Search’ options to help you find the desired match.

    3. Press Add to add the match to the list of matched locations.

      editGeographic2

    4. Optional: Enable ‘Show automatically matched values’ to see all currently matched locations.

    5. Repeat the above steps to match all locations and press OK.

  6. Optional: To remove the geographical status of a field, right click the field or press the ‘Actions’ button menu horizontal, and select ‘Clear Geographic’ from the context menu.

Transforming Coordinates for Alaska and Hawaii

For convenience, the default ‘U.S.’ map does not display Alaska and Hawaii in their geographical locations, but shifts and (in the case of Alaska) re-scales them to an inset position below California. For this reason, if you are plotting data on the ‘U.S.’ map you should transform your raw latitude and longitude data for Alaska and Hawaii prior to generating the chart.

To remap your raw longitude and latitude data, [long lat], to the corrected values, [long' lat'], apply the following matrix transformations to your data.

Example 1. Alaska Transform
\$[[long'\],[lat'\],[1\]\] = [[0.204,0,-85.0\],[0,0.354,5.0\],[0,0,1\]\] [[long\],[lat\],[1\]\]\$
Example 2. Hawaii Transform
\$[[long'\],[lat'\],[1\]\] = [[1,0,50.0\],[0,1,5.0\],[0,0,1\]\] [[long\],[lat\],[1\]\]\$

Explore More…​

The sample Global Visual Analysis Dashboard provides an example of a world map.

galleryBubble2

To explore this sample Dashboard, download and import the Global Visual Analysis Dashboard into your environment. (This requires access to Enterprise Manager.) See Import and Export Assets for instructions on how to import.


The sample Marketing Lead Trends Dashboard provides an example of a state map.

galleryMap2

To explore this sample Dashboard, download and import the Marketing Lead Trends Dashboard into your environment. (This requires access to Enterprise Manager.) See Import and Export Assets for instructions on how to import.


The sample Hurricane Dashboard provides an example of a map chart displaying a connected series of locations in the data.

galleryHurricane2

To explore this sample Dashboard, download and import the Hurricane Dashboard into your environment. (This requires access to Enterprise Manager.) See Import and Export Assets for instructions on how to import.