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.
  4. Under Data connections, click Select data on your Qlik GeoOperations connection.

  5. Under Operation, select Dissolve.

  6. Set the following parameters:

    • Dissolve field: SubregionName

    • Resolution: Source.

  7. Under Dataset 1, set the following parameters:
    • Type: Loaded table
    • Table name: Regions
    • Key field: State
    • Geometry type and field: Named area and State.
  8. Select the table and select the following fields:
    • SubregionName
    • DissolvedPolygon
  9. Click Insert script.
  10. 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.

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

  12. Under Operation, select Dissolve.

  13. Set the following parameters:

    • Dissolve field: RegionName

    • Resolution: Source.

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

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

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

    • RegionPolygon
    • SubregionPolygon
    • State
  21. Add a map.
  22. 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.
  23. 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!