Loading your own map data
To be able to create a map visualization, you need access to geographical data that connects to the data in your app. Qlik Sense can use:
- Name data in fields to place locations in map layers.
- Fields containing geopoints (latitude and longitude) in WGS-84.
-
Fields containing geopoints, polygons, or lines from a geographic data source such as a KML file.
- Fields containing geodata in GeoJSON, LineString, or MultiLineString formats.
- Fields containing non-WGS-84 coordinates (when using a custom map as the base map).
When loading map data in Data manager with data profiling enabled, the data profiling service will identify country names, city names, and latitude and longitude fields and load the corresponding geometries into new fields. In Data load editor, you can optionally combine coordinate fields into a single field for convenience. For more information about using your map data to create a map, see Maps.
Supported name data for fields in a map visualization
The map visualization can use name data in fields to place locations in map layers. The following location types can be used:
- Continent names
- Country names
- ISO alpha 2 country codes
- ISO alpha 3 country codes
- First-level administrative area names. such as a state or province names
- Second-level administrative area names
- Third order administrative area names
- Fourth order administrative area names
- City, village, or other populated place names
- Postal codes or ZIP Codes
- IATA airport codes
- ICAO airport codes
Availability of locations may vary by country. If the named location is not available, use coordinate or area data for the location.
Qlik Sense uses map and location data obtained from recognized field leaders who use accepted methodologies and best practices in marking borders and naming countries within their mappings. Qlik Sense provides flexibility to enable users to integrate their own, separate background maps. If the standard maps do not fit, Qlik Sense offers the option to load customer provided background maps, borders, and areas.
Loading point and area data from a KML file
You can add data from a KML file into your map in Data manager and Data load editor. By default, all fields are selected in the data selection dialog, even if they do not contain any data. A KML file could contain, for example, area data but no point data. When adding data from a KML file that contains an empty point or area field to Qlik Sense, you can exclude the empty field without running the risk of creating map dimensions without any data.
When adding a field from a KML field to a map layer, if the name field contains meaningful name data, it should be added as the dimension of the layer. The area or point field should then be added as the Location field. There will be no difference in how the data is visualized in the layer and the text in the name field will be shown as a tooltip.
Loading map data with data profiling
When you load geographical data using Add data in Data manager with data profiling enabled, Qlik Sense will try to recognize if your data contains:
-
Country and city names from your data
- Geopoint data (latitude, longitude) for a single location, such as a city
- Area data (polygons of geopoints) to represent regions or countries
If successful, a new field containing geographical information is created automatically.
If cities are recognized during data preparation, the new field contains geopoints, and if countries are recognized the new field contains area polygon data. This field is named <data field>_GeoInfo. For example, if your data contains a field named Office containing city names, a field with geopoints named Office_GeoInfo is created.
Qlik Sense analyzes a subset of your data to recognize fields containing cities or countries. If the matching is less than 75 percent, a field with geographical information will not be created. If a field is not recognized as geographical data, you can manually change the field type to geographical data.
For more information, see Changing field types.
Fields with geographical information do not display the geopoint or polygon data in the Associations preview panel or in the Tables view. Instead, the data is indicated generically as [GEO DATA]. This improves the speed with which the Associations and Tables views are displayed. The data is available, however, when you create visualizations in the Sheet view.
Loading and formatting point data
You can create a map by using point data (coordinates). Two formats are supported:
-
The point data is stored in two fields, one for latitude and one for longitude. You can add the fields to a point layer in the Latitude and Longitude fields in the point layer. Optionally, you can combine them into a single field. To combine them into a single field:
- If you used Add data with data profiled enabled to load the table, the latitude and longitude fields are recognized, and a geopoint field is created automatically.
-
If you loaded the data using the data load script, you can create a single field with point data in [x, y] format, using the function GeoMakePoint().
For more information, see Example: Loading point data from separate latitude and longitude columns with the data load script.
-
The point data is stored in one field. Each point is specified as an array of x and y coordinates: [x, y]. With geospatial coordinates, this would correspond to [longitude, latitude].
When using this format and loading the data in Data load editor, it is recommended that you to tag the point data field with $geopoint;.
For more information: Example: Loading point data from a single column with the data load script.
In the following examples we assume that the files contain the same data about the location of a company's offices, but in two different formats.
Example: Loading point data from separate latitude and longitude columns with the data load script
The Excel file has the following content for each office:
- Office
- Latitude
- Longitude
- Number of employees
The load script could look as follows:
Combine the data in the fields Latitude and Longitude to define a new field for the points.
Run the script and create a map visualization. Add the point dimension to your map.
You can choose to create the dimension Location in the script by adding the following string above the LOAD command:
LOAD *, GeoMakePoint(Latitude, Longitude) as Location;
The function GeoMakePoint() joins the longitude and latitude data together.
It is recommended that you tag the field Office with $geoname so that it is recognized as the name of a geopoint. Add the following lines after the last string in the LOAD command:
The complete script then is as follows:
Run the script and create a map visualization. Add the point dimension to your map.
Example: Loading point data from a single column with the data load script
The Excel file has the following content for each office:
- Office
- Location
- Number of employees
The load script could look as follows:
The field Location contains the point data and it is recommended to tag the field with $geopoint so that it is recognized as a point data field. It is recommended that you tag the field Office with $geoname so that it is recognized as the name of a geopoint. Add the following lines after the last string in the LOAD command:
The complete script then looks as follows:
Run the script and create a map visualization. Add the point dimension to your map.
Learn more
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!