Before you Begin

This tutorial shows you how to add data labels to your map visualization in Oracle Analytics.

Background

You can visualize data on maps with different backgrounds and data layers. In this tutorial, you learn how to display labels for the data points on your map. You create a dataset that contains latitude and longitude data elements and transform these data elements to use with the Latitude and Longitude data layer available in Oracle Analytics. You also implement property changes to learn how to customize your map visualization.

What Do You Need?

  • Access to Oracle Analytics
  • Download donation.xlsx to your computer

Create a Dataset

In this section, you create a dataset from the spreadsheet file that you downloaded to your computer.

  1. Sign in to Oracle Analytics.
  2. On the Home page, click Create and click Dataset.
  3. In Create Dataset, click Drop data file here or click to browse.
  4. In File Upload, click the donation.xlsx file and click Open.
  5. In Create Dataset Table from donation.xlsx, click OK.
  6. In the Join Diagram, click Measure Measure icon in the SCH_LATITUDE column and select Attribute.
  7. In the Join Diagram, click Measure Measure icon in the SCH_LONGITUDE column and select Attribute.
  8. Click Save Save icon. In Save Dataset As, enter school_donations and click OK.

Associate the Latitude and Longitude Columns with a Map Layer

In this section, you convert the SCH_LATITUDE and SCH_LONGITUDE columns to text attributes and associate the columns with a map layer.

  1. Click the donation tab.
  2. In the SCH_LATITUDE column, click Options Options icon and select Location Details.
  3. In Location Details SCH_LATITUDE, select Latitude from Location Type and click OK.


    The data element symbol changes from A, for attribute, to use the Location Location icon icon indicating the the column is associated with a map layer.

    Description of latitude_map_layer.png follows
    Description of the illustration latitude_map_layer.png
  4. In the SCH_LONGITUDE column, click Options Options icon and select Location Details.
  5. In Location Details LONGITUDE, select Longitude from Location Type and click OK.
  6. Click Save Save icon.

Create a Map Visualization

In this section, you create a map visualization. You also change the map background and the colors used for the data points.

  1. Click Create Workbook.
  2. In the Data pane under the school_donations dataset, hold-down the Ctrl key, select SCH_LATITUDE, SCH_LONGITUDE, and NUM_DONORS. Drag the data elements to the canvas.


    Description of num_donors_original.png follows
    Description of the illustration num_donors_original.png
  3. Click Properties Properties icon. In Properties, click Map Map properties icon.
  4. In the Zoom Control row, click Off to add the magnification controls to the map visualization.


    The Zoom Control value is On when the magnification controls are enabled.

  5. In the Background Map row, click Default (Oracle BI) and select Oracle Maps.
  6. In the map visualization, click Menu Visualization menu icon, select Color, and then select Manage Assignments. In Manage Color Assignments, click Presets, select Viridis, and then click Done.


    Description of updated_map_vis.png follows
    Description of the illustration updated_map_vis.png

Add Data Labels

In this section, you select the data element to use for the label, modify the font size, and select the label's location relative to the data point. Because the sample data contains a lot of data points, the tutorial is using an area of the map with the least data points, the State of Alaska.

  1. In the map visualization, click the Rectangular selection Rectangular selection tool icon tool, drag the cursor across the Alaska data points and release to make the selection.
  2. Click the visualization Menu Visualization menu icon and select Keep Selected.
  3. In Keep Selected, click Validate. Click Apply.


    Oracle Analytics outlines the selected data points with a black border.

    Description of alaska_data_points.png follows
    Description of the illustration alaska_data_points.png
  4. Click the zoom + control to get a closer view of an area in Alaska with the most data points. Adjust the magnification to reduce the overlapping data points.


    The largest concentration of data points is around Anchorage, Alaska.

  5. Click Properties Properties icon. In Properties, click Data Layers Data layers icon.
  6. In Data Layers, click Off in the Data Labels Position row and select Above.
  7. In the Columns row, click NUM_DONORS to use as the data point label. Click SCH_LATITUDE and SCH_LONGIITUDE to remove the checks.
  8. In the Font row, click Auto. Select 18 from the font size list.
  9. Click the zoom + control to view the number of donors where the data points overlap.


    You can control the level of magnification to see the details provided by the data labels.
    Description of num_donors_label.png follows
    Description of the illustration num_donors_label.png

Create a Map Visualization with Different Data

In this section, you duplicate the map visualization and select a different data element to use as the map's data point.

  1. In the map visualization, click Menu Visualization menu icon, select Edit, and then select Duplicate Visualization.
  2. In the Data pane, select TOTAL_DONATIONS and drag it to Color to replace NUM_DONORS.


    Description of total_donations.png follows
    Description of the illustration total_donations.png
  3. Click Properties Properties icon. In Properties, click Data Layers Data layers icon.
  4. In the Columns row, click None and click TOTAL_DONATIONS.
  5. In the Font row, click Auto 18, enter 14 to make more room for the data point value.
  6. In the Size row, click 18, and enter 10 to reduce the size of the data points.


    You can see the differences in the font and data point sizes in the map visualizations.

    Description of donors_donations.png follows
    Description of the illustration donors_donations.png

Learn More