Skip to main content Skip to complementary content

How I made this: Overlapping travel areas

You can generate multiple travel areas in a single field and use them in an area layer. For example, you may want to view see incremental increases in travel areas for a single point.

In this example, a map has been added that has a 60 minute travel area in road distance for Canadian provincial and territorial capitals in 10 minute increments

Map containing 60-minute travel areas for Canadian provincial and territorial capitals

Example map displaying only highlight points for each Canadian capital

When you click on point for a city, the map zooms in, making it easier to see the travel areas for the city.

Zoomed in view of the travel areas of Fredericton

Example zoomed-in view after a point has been selected, displaying more detailed road and travel data

The cost values for the area layer have been sorted so that the areas are overlaid on the map from greatest area to smallest area. This enables the smallest areas to be selected by users as otherwise they would be overlaid with the larger areas that overlap with them.

Data

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

[Cities]:

LOAD * inline

[

City

Edmonton,Canada;

Victoria,Canada;

Winnipeg,Canada;

Fredericton,Canada;

St. John's,Canada;

Halifax,Canada;

Toronto,Canada;

Charlottetown,Canada;

Quebec City,Canada;

Regina,Canada;

Whitehorse,Canada;

Iqaluit,Canada;

Yellowknife,Canada;

]

(delimiter is ';');

How I build 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 Travel areas.

  6. Under Cost, select Value and 60.

  7. Under Cost units, select Minutes.

  8. Under Transportation mode, select Car.

  9. Under Dataset 1, select Loaded table.

  10. Under Table name, enter Cities.

  11. Under Key field, select Specify and enter City.

  12. Under Geometry type and field, select Named point and enter City.

  13. Select the table and select the following fields:

    • City

    • TravelArea

    • Cost

  14. Click Insert script.

  15. Rename the table TravelArea.

    Copy and paste the inserted script five times and edit the costValue to 50, 40, 30, 20, and 10.

    Your load script should now look like this:

    [TravelArea]: Load * Extension GeoOperations.ScriptEval(' SELECT City, TravelArea, Cost FROM TravelAreas(costValue="60", costUnit="minutes", transportation="car") DATASOURCE dataset INTABLE keyField="City", crs="EPSG:4326", namedPointField="City" ', Cities); Load * Extension GeoOperations.ScriptEval(' SELECT City, TravelArea, Cost FROM TravelAreas(costValue="50", costUnit="minutes", transportation="car") DATASOURCE dataset INTABLE keyField="City", crs="EPSG:4326", namedPointField="City" ', Cities); Load * Extension GeoOperations.ScriptEval(' SELECT City, TravelArea, Cost FROM TravelAreas(costValue="40", costUnit="minutes", transportation="car") DATASOURCE dataset INTABLE keyField="City", crs="EPSG:4326", namedPointField="City" ', Cities); Load * Extension GeoOperations.ScriptEval(' SELECT City, TravelArea, Cost FROM TravelAreas(costValue="30", costUnit="minutes", transportation="car") DATASOURCE dataset INTABLE keyField="City", crs="EPSG:4326", namedPointField="City" ', Cities); Load * Extension GeoOperations.ScriptEval(' SELECT City, TravelArea, Cost FROM TravelAreas(costValue="20", costUnit="minutes", transportation="car") DATASOURCE dataset INTABLE keyField="City", crs="EPSG:4326", namedPointField="City" ', Cities); Load * Extension GeoOperations.ScriptEval(' SELECT City, TravelArea, Cost FROM TravelAreas(costValue="10", costUnit="minutes", transportation="car") DATASOURCE dataset INTABLE keyField="City", crs="EPSG:4326", namedPointField="City" ', Cities);
  16. Load the data.
  17. In the sheet view, add the field Cost as a master dimension called Cost. Assign these colors to the following values:

    • 10: 0096ff
    • 20: 40ff0c
    • 30: faff09
    • 40: ee8a03
    • 50: ff020d
    • 60: c100ff
  18. Add a map.
  19. Add a point layer with City as the dimension. Set the following properties:

    • In Color, set the Color to #f8981d.
  20. Add an area layer with TravelArea as the dimension. Set the following properties:

    • In Dimensions, change Label to Travel area.
    • In Colors, do the following: 
      • Color By dimension using the master dimension Cost and enable Library colors.
      • Set the Outline color to 000000.
      • Set Opacity to 50%.
    • In Sorting, set Travel area to sort numerically and by descending value.
  21. 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!