Early Access: The content on this website is provided for informational purposes only in connection with pre-General Availability Qlik Products.
All content is subject to change and is provided without warranty.
Skip to main content Skip to complementary content

How I made this: Dissolving regions and subregions

You can create custom regions using the dissolve operation. Using drill-down dimensions, you can create a hierarchical relationship between the multiple dissolved areas.

In this example, a map has been added that has USA states dissolved into regions and subregions. The maps use a drill-down dimension to create the hierarchy between region, subregion, and state.

Map with dissolved regions of the USA

Example map of the United States dissolved into regions

When you select a region, it drills down to the component subregions.

Map with a dissolved region selected, showing dissolved subregions

Map with a region selected, now displaying dissolved subregions

Selecting a subregion then displays the component states.

Map with a subregion selected showing component states

Map of a selected subregion, now displaying individual component states

Two drill-down dimensions are used to make this map. One contains the names of the regions and states. The second contains the geometry and is used as the location field.

Data

This example uses a single data set that is added inline in data load editor.

How I built this

  1. Add the data into Data load editor.
  2. Click Create new connection and select Qlik GeoOperations.
  3. Click Create new connection.

  4. Under Space, select the space where the connection will be located.

  5. Select Qlik GeoOperations from the list of data connectors.

  6. Click Create.
  7. Under Data connections, click Select data on your Qlik GeoOperations connection.

  8. Under Operation, select Dissolve.

  9. Set the following parameters:

    • Dissolve field: SubregionName

    • Resolution: Source.

  10. Under Dataset 1, set the following parameters:
    • Type: Loaded table
    • Table name: Regions
    • Key field: State
    • Geometry type and field: Named area and State.
  11. Select the table and select the following fields:
    • SubregionName
    • DissolvedPolygon
  12. Click Insert script.
  13. In the script, replace DissolvedPolygon with DissolvedPolygon as SubregionPolygon.

    Tip note

    When you are using multiple operations, it is important to rename default field names used by Qlik GeoOperations to avoid creating unwanted concatenations and loops in your load script.

  14. Under Data connections, click Select data on your Qlik GeoOperations connection.

  15. Under Operation, select Dissolve.

  16. Set the following parameters:

    • Dissolve field: RegionName

    • Resolution: Source.

  17. Under Dataset 1, set the following parameters:
    • Type: Loaded table
    • Table name: Regions
    • Key field: State
    • Geometry type and field: Named area and State.
  18. Select the table and select the following fields:
    • RegionName
    • DissolvedPolygon
  19. Click Insert script.
  20. In the script, replace DissolvedPolygon with DissolvedPolygon as RegionPolygon.

  21. Load the data.
  22. In the sheet view, create a drill-down dimension called Regions. Add the following fields to it, in order:

    • RegionName
    • SubregionName
    • State
  23. Create a drill-down dimension called RegionPolygons. Add the following fields to it, in order:

    • RegionPolygon
    • SubregionPolygon
    • State
  24. Add a map.
  25. Add an area layer using Regions as the dimension. Set the following properties:

    • In Location, set the Location field to RegionPolygons.
    • In Colors, set Colors to Custom and do the following:
      • Select Persistent colors
      • Select 100 colors.
      • Set Opacity to 50%.
      • Set Outline color to 000000.
  26. Center the region in the map and then set Limit pan navigation to Custom and click Set pan limit.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!