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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
daveatkins
Partner - Creator III
Partner - Creator III

How to create a zip code-based point layer on a map

I have a spreadsheet which contains demographic data on individuals including their zip code. I want to create a map with a point layer showing the number of people in each zip code with varying sized points based on the value of the column Meds? = 'Yes'. 

daveatkins_0-1689197902392.png

I cannot get even the most basic map to work as it does not recognize "zip" as location data. When I drag the ZIP field onto a map chart, it's just a mess. 

daveatkins_1-1689198335058.png

 

I tried to change the data type of the ZIP using the data manager, but after selecting "geo data" I much choose from one of four options for city or state data. There is no zip code option.

What do I need to do?

Labels (1)
3 Replies
RafaelBarrios
Partner - Specialist
Partner - Specialist

hi @daveatkins 

try adding the country code after the postal code

field: <postal_code>,<country_code>

Example: 3857,CH for Switzerland

RafaelBarrios_0-1689272499268.png

 

or use the postal code in location field and use country field to limit the scope

RafaelBarrios_1-1689272792820.png

i used a fixed value in location field but you could use a field, same for country field.

 

Hope this helps,

help users find answers! Don't forget to mark a solution that worked for you & to smash the like button!

 

daveatkins
Partner - Creator III
Partner - Creator III
Author

Thank you; I found several helping things to be done:

  1. clean the zip code when loading data: Num([ZIP],'00000') as ZIP, for example to solve issues like zip code 02139 in Massachusetts.
  2. The map chart layer will need a location field further specified as an expression like this to tell it the zip code is in the US: [ZIP] & ', US'
  3. need to make sure the zip field is being recognized as geo data; still not clear how to do that in load script
RafaelBarrios
Partner - Specialist
Partner - Specialist

Hi @daveatkins 

1. Agreed, be sure you have the proper zip format for the country

2. Agreed, it the same I just commented, I would take out the white space before ‘US’

3. Can’t be sure, but if you see my screenshoot is a field called “location type” there you can tell the map that the field is a zip code, but I think it’s not going to be necessary

 

Hope this helps,

help users find answers! Don't forget to mark a solution that worked for you & to smash the like button!