{"id":50,"date":"2009-11-17T18:01:00","date_gmt":"2009-11-17T18:01:00","guid":{"rendered":"http:\/\/graham-kendall.com\/blog\/?p=50"},"modified":"2020-09-22T02:01:24","modified_gmt":"2020-09-22T02:01:24","slug":"geocoding-trials-and-tribulations","status":"publish","type":"post","link":"https:\/\/graham-kendall.com\/blog\/geocoding-trials-and-tribulations\/","title":{"rendered":"Geocoding: Trials and Tribulations"},"content":{"rendered":"<p>For the past few months I have had a small project on the back burner to try and make geocoding easier.<\/p>\n<p>The motivation can be traced back to the data collection I had to do for the data I needed for my research on minimising the amount of travelling that football supporters have to do over the Christmas holiday period (if you are interested in this see this <a href=\"http:\/\/www.cs.nott.ac.uk\/~gxk\/papers\/gxkjors2008.pdf\">link<\/a>).<\/p>\n<p>When I collected the original data I used <a href=\"http:\/\/www.greenflag.com\/\">greenflag.com<\/a>. I could have used <a href=\"http:\/\/www.theaa.com\/\">theaa.com<\/a> or <a href=\"http:\/\/www.rac.co.uk\/\">rac.co.uk<\/a>. The problem with the latter two is that you had to type in the to\/from postcode into a web form. At least with greenflag.com the postcodes were part of the URL so it was a simple case of generating the correct URLs (which I did with Excel), uploading to a web site and then clicking on each link.<\/p>\n<p>But this was a long winded process in that I had to a) click on every to\/from link (about 900) and then scroll the screen to collect the actual mileage. That takes a long time and as I have done this for seven seasons I thought it was about time to try and automate the process.<\/p>\n<p>The obvious candidate was to use <a href=\"http:\/\/maps.google.co.uk\/\">Google maps<\/a>. When I started the sports scheduling research Google maps did not provide the facilities that I required. Things have moved on since then and Google maps now has an API which makes this type of automation a possibility.<\/p>\n<p>So, over the last few months I have been investigating how to use Google maps, which does not come without its problems. For example, it is not that accurate when using UK postcodes, you have to learn the API, ideally you need to geocode UK postcodes to longitude and latitude etc.<\/p>\n<p>I <span style=\"font-style:italic;\">think<\/span> that I have now resolved most of these problems and am just doing the last stages of test. So, more soon.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>For the past few months I have had a small project on the back burner to try and make geocoding easier. The motivation can be traced back to the data collection I had to do for the data I needed for my research on minimising the amount of travelling that football supporters have to do [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[177,56,7],"tags":[],"class_list":["post-50","post","type-post","status-publish","format-standard","hentry","category-archive","category-geocoding","category-sports-scheduling"],"_links":{"self":[{"href":"https:\/\/graham-kendall.com\/blog\/wp-json\/wp\/v2\/posts\/50","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/graham-kendall.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/graham-kendall.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/graham-kendall.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/graham-kendall.com\/blog\/wp-json\/wp\/v2\/comments?post=50"}],"version-history":[{"count":1,"href":"https:\/\/graham-kendall.com\/blog\/wp-json\/wp\/v2\/posts\/50\/revisions"}],"predecessor-version":[{"id":1685,"href":"https:\/\/graham-kendall.com\/blog\/wp-json\/wp\/v2\/posts\/50\/revisions\/1685"}],"wp:attachment":[{"href":"https:\/\/graham-kendall.com\/blog\/wp-json\/wp\/v2\/media?parent=50"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/graham-kendall.com\/blog\/wp-json\/wp\/v2\/categories?post=50"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/graham-kendall.com\/blog\/wp-json\/wp\/v2\/tags?post=50"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}