Country Map, Choropleth

A world map may be used to show a comparison of measurement values among countries. With data that meets ratio and statistical continuity guidelines, a choropleth map is a good chart choice.

The following steps demonstrate how to create a new map visual on the dataset World Life Expectancy [data source samples.world_life_expectancy]. It produces colored regions for the measurements that correspond to the country field.

  1. Start a new visual based on dataset World Life Expectancy [data source samples.world_life_expectancy]; see Creating Visuals.
  2. In the visuals menu, find and click map (row 4, column 1).

    selecting map chart type
  3. Note that the shelves of the visual changed. They are now X, Y, Geo, Measures, Tooltips, and Filters.

    The mandatory shelves for map visuals are Geo and Measures.

  4. Populate the shelves from the available fields (Dimensions, Measures, and so on) listed in the left navigation menu.

    • Under Dimensions, select country and drag it over the Geo shelf on the main part of the screen. Drop to add it to the shelf.
    • Under Measures, select gdp_per_capita and drag it over the Measures shelf on the main part of the screen. Drop to add it to the shelf.
  5. On the shelf, on sum(gdp_per_capita) field, click the icon (down arrow), select Aggregates, and then select Remove Aggregate.

  6. Note that the shelf now contains the modified field gdp_per_capita.

  7. Click Refresh Visual.

    The map visual graph appears.

  8. [Optional] On the Tooltips shelf, add several fields from Dimensions and Measures.

    This enables you to see specific descriptive information in your visuals, such as input values, segment affiliation, and calculations.

    For example,

    • From Dimensions, drag un_subregion, un_region, and year onto the Tooltip shelf.
    • For all items on the Tooltip shelf, click the icon (down arrow), select Aggregates, and then select Remove Aggregate.
  9. Alias the gdp_per_capita field:
    • On the shelf, on gdp_per_capita field, click the icon (down arrow), select Alias, and then select Set.

    • In the Enter a column alias modal window, enter GDP per Capita.

    • Click Save.

  10. Alias un_subregion, un_region, and year as UN Subregion, UN Region, and Year, respectively.
  11. For GDP per Capita, click the icon (down arrow), select Display Format, and enter ,.0f.
  12. [Optional] Enable panning and zooming option, as described in Customizing Zoom.
  13. [Optional] Change the color palette to blue, as described in Change Color Palette.
  14. Click Refresh Visual.

    The map visual appears.

    You can move the visual (pan), zoom in and out, and see the details in the Tooltips text.

  15. Click Edit next to the title of the visualization.

  16. Change the title to World Population - Choropleth Map.
  17. Above the left navigation bar, click Save.