Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi patricn bps amz mto bqg .
I Am trying to use named are lookup with geo analytics.
with the zip code when i do a lookup it is giving state information for only US,other than us it is just giving country information.
How to get country,state,city information with zipcode for all over the world?
LIB CONNECT TO 'GA';
/* Generated by Idevio GeoAnalytics for operation NamedAreaLookup ---------------------- */
Let [areasInlineTable] = 'id' & Chr(9) & 'zip';
Let numRows = NoOfRows('data');
Let chunkSize = 1000;
Let chunks = numRows/chunkSize;
For n = 0 to chunks
Let chunkText = '';
Let chunk = n*chunkSize;
For i = 0 To chunkSize-1
Let row = '';
Let rowNr = chunk+i;
Exit for when rowNr >= numRows;
For Each f In 'id', 'zip'
row = row & Chr(9) & Replace(Replace(Replace(Replace(Replace(Replace(Peek('$(f)', $(rowNr), 'data'), Chr(39), '\u0027'), Chr(34), '\u0022'), Chr(91), '\u005b'), Chr(47), '\u002f'), Chr(42), '\u002a'), Chr(59), '\u003b');
Next
chunkText = chunkText & Chr(10) & Mid('$(row)', 2);
Next
[areasInlineTable] = [areasInlineTable] & chunkText;
Next
chunkText=''
[LookupResult]:
SQL SELECT * FROM NamedAreaLookup(nameField='zip', type='XPC', country='Any', nameTable='areas')
//[zip], [areas_Geometry], [areas_Name], [CountryIso2], [areas_Adm1Code], [areas_Adm2Code]
DATASOURCE areas INLINE tableName='data', tableFields='id,zip', geometryType='NONE', loadDistinct='NO', suffix='', crs='Auto' {$(areasInlineTable)}
;
[areasInlineTable] = '';
do you think do i need to make any changes
Hi Naveen,
I see you are trying to retrieve areas for zip codes.
At this moment, we only have postal codes areas available for these countries:
country | name |
FR | France |
AR | Argentina |
EC | Ecuador |
DK | Denmark |
DE | Germany |
IS | Iceland |
NL | Netherlands |
CA | Canada |
ES | Spain |
AU | Australia |
GB | United Kingdom |
NO | Norway |
UY | Uruguay |
SE | Sweden |
FI | Finland |
CH | Switzerland |
LI | Liechtenstein |
MX | Mexico |
US | United States |
Can you show some examples for zip values in your dataset? To see if the format is correct.
GeoAnalytics also has coordinates for the postal codes center points in 76 countries in total. So, for more results you can try the NamedPointLookup operation instead.
Best Regards,
Ana
HI Ana
When i do a named point lookup it throws me an error Default schema is not found.
And i heard that it requires a seperate license and this product is not release yet .Is that true?
Hello Naveen,
The NamedPointLookup operation is available with the standard Qlik GeoAnalytics. It only works with location names like States, Territories, Counties, Municipalities, postal codes, etc... but not with addresses.
The operations that will be licensed separately are AddressPointLookup and PointToAddressLookup (both of them solve address level lookups).
An easy way to see if the zipcode center point exists in our location server is to add a Bubble Layer on your map and then use this format 'zip:XPC,country', for example: '94203:XPC,US', '770-8040:XPC,JP', '3195:XPC,AU'.
Best Regards,
Ana