Skip to main content Skip to complementary content

GeoAnalytics example: Drill-down map

When creating a map that has multiple points of data located in a wide geographical area, you can use drill-down dimensions to display your layers in a hierarchy of selection. This enables you to use different layers at different levels within your map, ensuring only the most relevant information is being displayed.

This example will show you how to build a GeoAnalytics map a top-level area layer that drills down into another area layer and two bubble layers.

Example

We have a list of all historical sites in the United States National Park Service's National Register of Historic places. When we add the cities that historical sites are located in to a map as a bubble layer, while we get accurate locations for our bubbles, it could be made more understandable with better organization.

Example map of North America, with many overlapping bubbles representing cities with historical sites

How then can we organize this information better, especially if we also want to add in another bubble layer containing airports? 

To solve this problem, we will create a map of the United States of America with a layer of states that drills down to the county level. Drilling down to the county level will also show as data bubbles the cities that contain the historical sites as well as all airports for that state and the surrounding states. We will also create custom info bubbles to provide relevant information to our users.

Initial view of map

Initial country-level view of map, with the United States of America divided into state boundaries

Drilled down view of map

Drilled-down view of the state map, displaying a bubble view only when zoomed in, which displays bubbles for each city/ historic site

This example creates a map of the United States of America with distinct areas for states. When a state is selected, the map drills down to the state counties that contain cities with historical landmarks as well as all airports for that state and surrounding states are made visible. This example adds custom labels so that counties display a count of how many landmarks they have and cities display a count of their landmarks as well as the name of landmarks (if there is room in the info bubble).

Dataset

This example uses two sets of data:

  • federal_listed_20190404.xlsx

    This data set is available from the National Park Service's National Register of Historic Places. It contains data about all registered history places, their location, and the federal agencies associated to them.

    federal_listed_20190404.xlsx

     

    When using this data set, it is recommended that you perform the following data cleanup before loading the data into Data manager:

    • Delete row 4975 (81000703 American Legation Listed Single 1/8/1981 FALSE Tangier Morocco STATE DEPARTMENT Old Legation-Museum Building MOROCCO 8 Zankat America (Rue d'Amerique)). This row contains a location outside of the United States, which will introduce an error into the visualizations.

  • Airport data

    This table contains data for airports in the United States. It consists of each airport's International Air Transport Association (IATA) code, city, and state or territory.

    You must import this data into Qlik Sense by adding to a spreadsheet that you then import into Qlik Sense.

Instructions

Once you have loaded the datasets into a new app in Qlik Sense, you can begin building your map. To make the example map, you must complete the following tasks: 

  1. Create the drill-down dimensions.
  2. Add the map layer to the sheet.
  3. Add the State area layer.
  4. Add the County area layer.
  5. Add the City bubble layer.
  6. Add the Airport bubble layer.
  7. Add the Resource filter pane.

1. Creating the drill-down dimensions

First, you need to create three drill-down dimensions. This will create the relationships between State and the fields County, City, and Airport, enabling the County, City, and Airport layers to become visible after a state from the State layer has been selected.

  1. In sheet view, click Edit Edit sheet in the toolbar.
  2. Click Linked Object to display the master items.
  3. Click Dimensions.
  4. Click Create new.
  5. Select Drill-down.
  6. Add the field State to the dimension.
  7. Add the field County to the dimension.
  8. After Name, type State-County.
  9. Click Create.
  10. Add the field State to the dimension.
  11. Add the field City to the dimension.
  12. After Name, type State-City.
  13. Click Create.
  14. Add the field State to the dimension.
  15. Add the field Airport to the dimension.
  16. After Name, type State-Airport.
  17. Click Create.
  18. Click Done.

2. Adding the map layer

The next step is to add a GeoAnalytics map to your sheet..

  1. In sheet view, click Edit Edit sheet in the toolbar.
  2. Click Extension puzzle piece icon to open extensions.
  3. Drag and drop GeoAnalytics Map into your sheet.

3. Adding the State area layer

The first layer you add is the State area layer, to which you add the dimension State-County. You then configure it so that the states are only visible at the first level of drill-down. In addition, you set the country as the United States to ensure it maps to the state of Georgia rather than the nation of Georgia.

  1. In sheet view, click Edit Edit sheet in the toolbar.
  2. Click Extension puzzle piece icon to open extensions.
  3. Drag and drop GeoAnalytics Area Layer into your sheet.
  4. Select the GeoAnalytics Area Layer.
  5. Click ID.
  6. Click Add Dimension and select State-County.
  7. Click Layer Options.
  8. Set the Restrict Drill Down slider to 0.
  9. Click Location Options.
  10. In the Location Source drop-down, select Dimension.
  11. In the Country drop-down, select United States.
  12. Click Appearance.
  13. Click Legend.
  14. Set Color Legend to Custom.
  15. Clear Show Colors.
  16. Click Colors.
  17. Set Colors to Custom, select By dimension, and select 100 colors.
  18. Adjust the Transparency slider to half transparency.
  19. Click Edit Done.

4. Adding the County area layer

Next, add the County area layer. In addition to giving the layer the dimension State-County, you add a location measure to the layer that will qualify each county to its state, as many county names are shared across states. You also specify in the location settings that the County field is an Adm 2 Area, as this corresponds to counties in the United States.

You also restrict the layer to be visible on all layers save for the top layer, as you only want State visible at the top layer.

Finally, customize the info bubble using an expression to display the county name, a count of the sites in the county, and if there is only one site there, the name of the site.

  1. In sheet view, click Edit Edit sheet in the toolbar.
  2. Click Extension puzzle piece icon to open extensions.
  3. Drag and drop GeoAnalytics Area Layer into your sheet.
  4. Select the GeoAnalytics Area Layer.
  5. Click ID.
  6. Click Add Dimension and select State-County.
  7. Click Location ID.
  8. Click Add measure and type the following expression: County&','&State&',US'.
  9. Click Layer Options.
  10. Set the Restrict Drill Down slider to 1-16.
  11. Click Location Options.
  12. In the Location Source drop-down, select Measure.
  13. In the Type drop-down, select Adm 2 Area.
  14. Click Appearance.
  15. Click Legend.
  16. Set Color Legend to Custom.
  17. Clear Show Colors.
  18. Click Colors.
  19. Set Colors to Custom, select By dimension, and select 100 colors.
  20. Adjust the Transparency slider to half transparency.
  21. Click Info Bubble and set Info Bubble to Custom.
  22. Type the following expression: '<strong>'&County&'</br>'&'Sites: </strong>'&Count(Resource)&'</br>'&Resource.
  23. Click Edit Done.

5. Adding the City bubble layer

The next layer you add is the City bubble layer. You add State-City as the dimension and then add a measure to qualify the cities, as some cities in different states have the same name.

You also restrict the layer to be visible on all layers save for the top layer, as you only want State visible at the top layer.

In addition, we you add an expression so that this layer's info bubbles display the city name, a count of the sites in the city, and, if there is only one site there, the name of the site.

  1. In sheet view, click Edit Edit sheet in the toolbar.
  2. Click Extension puzzle piece icon to open extensions.
  3. Drag and drop GeoAnalytics Bubble Layer into your sheet.
  4. Select the GeoAnalytics Bubble Layer.
  5. Click ID.
  6. Click Add Dimension and select State-City.
  7. Click Location, Size.
  8. Click Add measure and type the following expression: City&','&State.
  9. Click Layer Options.
  10. Set the Restrict Drill Down slider to 1-16.
  11. In the Country drop-down, select United States.
  12. Click Appearance.
  13. Click Shape and Size.
  14. Adjust the Radius slider to Min 11 - Max 11.
  15. Click Colors.
  16. Set Colors to Custom, select Single color, and select a color.
  17. Click Info Bubble and set Info Bubble to Custom.
  18. Type the following expression: '<strong>'&City&'</br>'&'Sites: </strong>'&Count(Resource)&'</br>'&Resource.
  19. Click Edit Done.

6. Adding the Airport bubble layer

The final layer you add to the map is the Airport bubble layer. You add the Airport field as the dimension, as GeoAnalytics recognizes IATA codes for placement, ensuring the airports are located in their actual position rather than just in their city.

You configure this layer so that it is not included in the auto zoom, as this would prevent the map from zooming in on state counties when a state is selected.

You also make a custom info bubble with an expression that displays the airport city's name and the airport code. To do this, you must add the field AirportCity to the bubble layer as a measure so it can be used in the info bubble.

  1. In sheet view, click Edit Edit sheet in the toolbar.
  2. Click Extension puzzle piece icon to open extensions.
  3. Drag and drop GeoAnalytics Bubble Layer into your sheet.
  4. Select the GeoAnalytics Bubble Layer.
  5. Click ID.
  6. Click Add Dimension and select State-Airport.
  7. Click Location, Size.
  8. Click Add measure and type the following expression: AirportCity.
  9. Click Layer Options.
  10. Set the Restrict Drill Down slider to 1-16.
  11. Clear the Include in Auto Zoom check box.
  12. Click Location Options.
  13. In the Location Source drop-down, select Dimension.
  14. In the Country drop-down, select United States.
  15. Click Appearance.
  16. Click Shape and Size.
  17. In the Shape drop-down, select Triangles.
  18. Adjust the Radius slider to Min 11 - Max 11.
  19. Click Colors.
  20. Set Colors to Custom, select Single color, and select a color.
  21. Click Info Bubble and set Info Bubble to Custom.
  22. Type the following expression: '<strong>'&AirportCity&'</strong>'&'</br>'&Airport.
  23. Click Edit Done.

7. Add the Resource filter pane

Finally, you can optionally a filter pane containing the field Resource. This provides you with a list of the available historical sites as you make selections within your map.

  1. In the assets panel, drag and drop a filter pane into the sheet.
  2. Click Add dimension.
  3. Add a filter pane containing the field Resource.

Result

You now have a completed GeoAnalytics map that contains two area layers and two bubble layers. When you select a state in your GeoAnalytics map, it should now zoom into the state's counties, where you can see the cities and airports. If you hover your cursor over the county, you should see the county name, a count of how many historical sites are in the county, and if there is a single site, that site's name. If you hover your cursor over a city, you should see the city name, a count of how many historical sites are in the city, and if there is a single site, that site's name. If you hover your cursor over an airport, you should see the city name and the airport code.

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!