Skip to main content

Posts

Showing posts from November, 2013

Slovenian Postal Codes v. 2

In my previous blog post I gave a list of Slovenian postal codes based on a revision of an online source. Below I give you a Google based object oriented VBA solution, which easily generalizes to parsing of other xml sources. Geocoding can have an enormous impact on presentations and requires a careful processing. I use an automated VBA routine inspired by the code below, but still find that inspection is necessary. Often there are several loations of observations, businesses or respondents in a survey, that have to pinpointed using auxiliary information, which depends on the problem at hand. Have a look at www.hellmund-laier.dk

VBA module
Option Explicit

Public xmlDoc As MSXML2.DOMDocument60

Public Function lat(searchfield As String)
Dim googleUrl As String
googleUrl = "http://maps.googleapis.com/maps/api/geocode/xml?address=" & searchfield & "&sensor=false"
Set xmlDoc = New MSXML2.DOMDocument60
xmlDoc.async = False
xmlDoc.Load (googleUrl)
lat = xmlDoc…

Slovenian Postal Codes

Geocoded Slovenian postal codes PCode Latitude Longitude 1000 46,0652 14,5317 1001 46,0652 14,5317 1210 46,0652 14,5317 1211 46,0652 14,5317 1215 46,1333 14,4333 1216 46,1642 14,4325 1217 46,2 14,5 1218 46,1792 14,5317 1219 46,2194 14,7611 1221 46,2153 14,8911 1222 46,1883 14,8831 1223 46,1769 14,8072 1225 46,1667 14,7 1230 46,1381 14,5978 1231 46,1528 14,5961 1233 46,1519 14,6286 1234 46,1669 14,575 1235 46,1736 14,6122 1236 46,1333 14,5667 1241 46,2197 14,6094 1242 46,2619 14,6022 1251 46,1369 14,745 1252 46,12 14,8392 1260 46,0667 14,5833 1261 46,0776 14,5921 1262 46,0886 14,6008 1270 46,0586 14,8225 1272 46,0667 14,95 1273 46,0353 15,0189 1274 46,0167 15 1275 46,0444 14,8442 1276 46,0443 14,9271 1281 46,1167 14,7833 1282 46,0833 14,9 1290 45,9556 14,6589 1291 45,9833 14,5767 1292 45,9603 14,5289 1293 45,9761 14,6103 1294 45,9539 14,7453 1295 45,9383 14,8044 1296 45,9464 14,8306 1301 45,8614 14,8342 1303 45,8614 14,8342 1310 45,7386 14,7275 1311 45,8789 14,6153 1312 45,7737 14,6…