Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Clever_Anjos
Employee
Employee

Geocoding zip codes other than US

I´ve been trying to convert zip codes to geometries using NamedPointLookup

I´m using a small sample of Brazilian (1-3), Canadian(13-15) and US (4-12) zip  codes to check if the problem is the code or data.

zip:

load * inline [

ID, zip

1, "38408138"

2, "38408"

3, "38308-138

4, "33101"

5, "33130"

6, "33102"

7, "33106"

8, "33122"

9, "33125"

10,"33126"

11,"33127"

12,"33128"

13,"H1A 0A1"

14,"H1A 0A2"

15,"H1A 0A5"

];

I used this setup and only US codes are working.

Capture.PNG

Any hint?

1 Solution

Accepted Solutions
Patric_Nordstrom
Employee
Employee

Hi,

Add the country code to the location string and remove the country code in the operation dialogue to make it dynamic.

For Canada only 3-digit postcodes exist, for Brazil there are 5-digit, but the for the zip provided only the 4-digit exist in the location db.

zip.png

zip: 

load * inline [ 

ID, zip 

2, "3840,BR" 

 

4, "33101,US" 

5, "33130,US" 

6, "33102,US" 

7, "33106,US" 

8, "33122,US" 

9, "33125,US" 

10,"33126,US" 

11,"33127,US" 

12,"33128,US" 

 

13,"H1A,CA" 

]; 

Thanks,

Patric

View solution in original post

3 Replies
Patric_Nordstrom
Employee
Employee

Hi,

Add the country code to the location string and remove the country code in the operation dialogue to make it dynamic.

For Canada only 3-digit postcodes exist, for Brazil there are 5-digit, but the for the zip provided only the 4-digit exist in the location db.

zip.png

zip: 

load * inline [ 

ID, zip 

2, "3840,BR" 

 

4, "33101,US" 

5, "33130,US" 

6, "33102,US" 

7, "33106,US" 

8, "33122,US" 

9, "33125,US" 

10,"33126,US" 

11,"33127,US" 

12,"33128,US" 

 

13,"H1A,CA" 

]; 

Thanks,

Patric

pwagner
Partner - Creator III
Partner - Creator III

Hello Patric,

Works. Now I would like to show the zip codes as area. 

What is the difference from "NamedPointLookup" to "NamedAreaLookup"? Could you explain this on this example, please?

 

Thanks, Patrick

Patric_Nordstrom
Employee
Employee

NamedAreaLookup and NamedPointLookup are very similar in the indata, the only difference is the return geometry. NamedAreaLookup returns areas and NamedPointLookup returns points.

In the locatiion db there are many more points than areas so you won't get as many results with NamedAreaLookup.

I recommend to have look at the coverage doc to see what can be expected per country:

https://community.qlik.com/t5/Qlik-GeoAnalytics-Documents/Qlik-GeoAnalytics-Coverage/ta-p/1479148

Thanks,

Patric