Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Talend Cloud AWS EU Scheduled Outage: Starting Tues 26 May 21:00 CEST with expected completion Wed 27 May 01:00 CEST
cancel
Showing results for 
Search instead for 
Did you mean: 
C_Rey
Contributor
Contributor

KML File(s), USA (AK/HI below)

Hello Qlik Community

Does anyone happen to have a KML file for a map that looks like below.  If not, a KML file for just Alaska would be greatly appreciated.  Thank you.

C_Rey_0-1689178289669.png

 

1 Solution

Accepted Solutions
Grafrath
Contributor
Contributor

Attached is a zip file containing:

  • us_states_inset.kml: a Keyhole Markup Language file of the US states with insets. The inset position isn't identical to your image, but it's similar.
  • StateMap.xlsx: a spreadsheet mapping the KML identifiers to state names and abbreviations. I found that I needed this when I used the KML file, but later found an easier way to do it (below).
  • us_states_inset.json: a GeoJSON version of the same thing, in case anyone wants it.
  • us_states_inset.txt: a tab-delimited text file that can be used the same way as a KML file to create the region definitions. I found this to be the most straightforward method for setting up map data.

Instructions on setting up your US map in Qlik Sense Enterprise, the easy way:

1. Go to Data Manager > Add Data and drop the us_states_inset.txt file (or put it somewhere you can access via the load script)

2. Switch to the Data Load Editor. Paste this into your load script:

[us_states_inset]:
LOAD
[state_abbr],
[state_name],
[state_area]
 FROM [lib://AttachedFiles/us_states_inset.txt]
(txt, embedded labels, delimiter is '\t', msq);
Tag field state_area with $geopoint;
Tag field state_abbr with $geoname;
Note: state_abbr is the 2-character state code. If the state field in your application is named differently, feel free to alias it in the load script so that they connect appropriately.
 
3. Reload!
 
4. Add a map object to one of your sheets. Edit the properties:
Layers > Add layer. Layer type: Area Layer.
Dimensions > Add. Area: state_abbr
Location > Location field: state_area
Colors > By measure. Add your measure, such as count(value)
Go back to the main properties of the map
Map settings > Base map (click on image) > None (select the blank image)

View solution in original post

1 Reply
Grafrath
Contributor
Contributor

Attached is a zip file containing:

  • us_states_inset.kml: a Keyhole Markup Language file of the US states with insets. The inset position isn't identical to your image, but it's similar.
  • StateMap.xlsx: a spreadsheet mapping the KML identifiers to state names and abbreviations. I found that I needed this when I used the KML file, but later found an easier way to do it (below).
  • us_states_inset.json: a GeoJSON version of the same thing, in case anyone wants it.
  • us_states_inset.txt: a tab-delimited text file that can be used the same way as a KML file to create the region definitions. I found this to be the most straightforward method for setting up map data.

Instructions on setting up your US map in Qlik Sense Enterprise, the easy way:

1. Go to Data Manager > Add Data and drop the us_states_inset.txt file (or put it somewhere you can access via the load script)

2. Switch to the Data Load Editor. Paste this into your load script:

[us_states_inset]:
LOAD
[state_abbr],
[state_name],
[state_area]
 FROM [lib://AttachedFiles/us_states_inset.txt]
(txt, embedded labels, delimiter is '\t', msq);
Tag field state_area with $geopoint;
Tag field state_abbr with $geoname;
Note: state_abbr is the 2-character state code. If the state field in your application is named differently, feel free to alias it in the load script so that they connect appropriately.
 
3. Reload!
 
4. Add a map object to one of your sheets. Edit the properties:
Layers > Add layer. Layer type: Area Layer.
Dimensions > Add. Area: state_abbr
Location > Location field: state_area
Colors > By measure. Add your measure, such as count(value)
Go back to the main properties of the map
Map settings > Base map (click on image) > None (select the blank image)