Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Apr 2, 2021 4:34:15 AM
May 30, 2019 4:28:15 PM
Mapping data based on postal code areas or center points is a common task. However postal codes is not a one global standard and there is lot of variation between countries in format and structure that makes the task challenging.
Also the availability of postal code areas varies, many countries are included in the Qlik Location database, but for others postal code areas need to be purchased separately.
Here's the high level workflow, the bulk is data preparation before rendering
1. Prepare the data
- Make the postal codes unique
- Pad with zeroes
- Some countries are special
- Check coverage
- Build overview layers when possible
This app will show how to map postal code areas for five European countries: France, Great Britain, Germany and Italy. The indata is not clean and contains errors like in most uses cases.
Make the postal codes unique
When mapping postal codes for several countries the first step is to make the postal code unique. The easiest way to do this is to add country code prefixed with a comma after the postal code.
=Postal & ',' & CountryCode as zip
Pad with zeroes
In many cases Excel drops leading zeroes in numerical postal codes. I can see that when looking at the max and min lengths. Note that not all postal codes are numeric though and UK is special so we fix that later. Pad with leading zeroes for France, Germany and Italy like this:
The postcodes are alphanumeric, and are variable in length: ranging from six to eight characters (including a space) long. Each post code is divided into two parts separated by a single space. More info at Wikipedia. Here's the three levels comparable to 2,3 and 4 digit numeric postal codes:
@Patric_Nordstrom thanks , this is helpful however I went through the data prep and still having a significant issue in that many of my US zip codes are showing up in seemingly random countries in Europe. My Zips are padded to be 5 digits and country code is US. For example 49424,US
49424,US works for me:
Hi Patric,
Question regarding Italy. We use QlikSense Business, but the cloud version, not the desktop.
We have postal codes for UK, France, Spain, Germany and Italy. We are able to plot the postal areas to area maps nicely for every country but Italy.
Do you think Qlik is still not supporting the postal code area level for Italy? Alternatively it would be also good if we could use the "commune" level of Italy, that should be administration level 3 I beleive, but as far as I see admin. level 2 is the lowest I can go down in Italy.
Is this the case? Do you know any workaround in cloud?
Many thanks in adavance,
Tamás
Not in any near future, meanwhile load the commune level of Italy using the techniques described above.
https://www.istat.it/ is good source of Italian boundary data.
Thanks,
Patric
I liked the solution posted by @Patric_Nordstrom "49424,US works for me" but i Tried the same solution for postal codes in colombia that are good postal codes according google maps
https://www.google.com/maps/d/viewer?mid=19zdhyjMAOw3AeAC5XE-CTpEYPd0a1pHT&ll=6.268636560264406%2C-7...
but for some reason I cannot make it work in my tenant at google cloud as an area layer... any ideas?
pls find a data sample i have
INTABLE.Ciudad_geo | INTABLE.Geolocation1 | INTABLE.Latitude | INTABLE.Longitude | postal_code_ |
MEDELLIN | [6.1958,-75.583758] | 6.1957997 | -75.5837577 | 055411 |
MEDELLIN | [6.2156,-75.582638] | 6.2156 | -75.5826378 | 050024 |
MEDELLIN | [6.2281,-75.571809] | 6.2281001 | -75.5718093 | 050021 |
MEDELLIN | [6.2281,-75.602588] | 6.2281001 | -75.6025883 | 050026 |
MEDELLIN | [6.2326,-75.602707] | 6.2325996 | -75.6027073 | 050026 |
MEDELLIN | [6.2353,-75.570487] | 6.2353002 | -75.5704869 | 050015 |
MEDELLIN | [6.2362,-75.574794] | 6.2362005 | -75.5747941 | 050015 |
MEDELLIN | [6.2378,-75.592741] | 6.2377998 | -75.5927409 | 050030 |
MEDELLIN | [6.16268,-75.626596] | 6.1626796 | -75.6265956 | 055413 |
MEDELLIN | [6.18535,-75.656993] | 6.1853497 | -75.6569934 | 050029 |
MEDELLIN | [6.19713,-75.580071] | 6.1971301 | -75.5800714 | 050022 |
MEDELLIN | [6.19754,-75.573441] | 6.1975399 | -75.5734407 | 050022 |
MEDELLIN | [6.20217,-75.584456] | 6.2021704 | -75.5844561 | 050023 |
MEDELLIN | [6.20271,-75.587207] | 6.20271 | -75.5872073 | 050023 |
MEDELLIN | [6.20279,-75.580872] | 6.2027897 | -75.5808715 | 050024 |
MEDELLIN | [6.20753,-75.575634] | 6.2075303 | -75.5756338 | 050022 |
MEDELLIN | [6.20757,-75.576063] | 6.2075696 | -75.5760631 | 050022 |
MEDELLIN | [6.21555,-75.563876] | 6.2155501 | -75.5638763 | 050021 |
MEDELLIN | [6.21744,-75.5748] | 6.2174397 | -75.5748001 | 050021 |
MEDELLIN | [6.22565,-75.606873] | 6.22565 | -75.6068733 | 050026 |
MEDELLIN | [6.22885,-75.582382] | 6.2288496 | -75.5823825 | 050001 |
MEDELLIN | [6.23097,-75.581105] | 6.23097 | -75.5811051 | 050024 |
MEDELLIN | [6.23319,-75.573945] | 6.2331902 | -75.5739454 | 050015 |
MEDELLIN | [6.23501,-75.574457] | 6.2350097 | -75.5744573 | 050015 |
MEDELLIN | [6.23716,-75.572602] | 6.23716 | -75.5726016 | 050015 |
MEDELLIN | [6.23796,-75.595223] | 6.2379604 | -75.5952234 | 050030 |
MEDELLIN | [6.23845,-75.569847] | 6.2384503 | -75.5698466 | 050016 |
MEDELLIN | [6.23915,-75.59709] | 6.2391501 | -75.5970901 | 050031 |
MEDELLIN | [6.23918,-75.592547] | 6.2391799 | -75.592547 | 050031 |
MEDELLIN | [6.24103,-75.571357] | 6.2410298 | -75.571357 | 050015 |
MEDELLIN | [6.24554,-75.570219] | 6.2455405 | -75.5702186 | 050015 |
MEDELLIN | [6.24727,-75.562467] | 6.2472704 | -75.5624674 | 050010 |
MEDELLIN | [6.24877,-75.565606] | 6.2487697 | -75.5656056 | 050012 |
MEDELLIN | [6.24896,-75.578818] | 6.2489605 | -75.5788179 | 050015 |
MEDELLIN | [6.25007,-75.576471] | 6.2500699 | -75.5764714 | 050015 |
MEDELLIN | [6.25211,-75.575899] | 6.25211 | -75.575899 | 050010 |
Hello @hectorgarcia,
We don't have polygons for Colombian postal codes yet, but the good news is that we are adding them soon to our location database and will be available in the coming days.
In the meantime I would suggest to use Point Layer instead, to at least have them represented as a point on the map.
Best Regards,
Ana
@Ana_Yakushi but i see in the coverage pdf that postal code is covered for colombia
Hello @hectorgarcia,
Do you mean the QGA Coverage Table? If you look at the top of the table, there is a separation between points and areas. For Colombia we have full coverage in point data. For areas the coverage is only admin1 and admin2.
Best Regards,
Ana
@Ana_Yakushi do you have an estimated date for release the new geolocation database with the polygons?
@hectorgarcia we are currently testing the new version. If everything goes well, it should be released within the next 2 weeks.