Busy making things: tinycast, github, links, photos, @mc.

Geolocation Information Gaps

Posted: August 5th, 2005 | Author: | Filed under: Projects, Python | 96 Comments »

I’ve been seeking out interesting data sources to plot in Google Earth after learning the basics of KML. I’ve been wanting to do something cool with NOAA’s XML weather feeds since I heard about them, so I thought I would download the 700kb list of stations serving up XML and spit out some KML from that data as a “neat” first step.

I’ll probably still do that, but after parsing the data, I’m a bit dissapointed. As always there are huge gaps in geolocation information. In order to get my hands on the data I turned to xmltramp which is an awesome library for accessing simple XML documents in a pythonic way. I then whipped up a few lines of Python to walk through the data:

import xmltramp # http://www.aaronsw.com/2002/xmltramp/

f=open('stations.xml', 'r')
doc=xmltramp.parse(f.read())
count = 0
total = 0
for station in doc['station':]:
  total = total + 1
  sid = str(station['station_id'])
  lat = str(station['latitude'])
  lon = str(station['longitude'])
  if (lat != 'NA') and (lon != 'NA'):
    print "Station ID: " + sid + \
    " (" + lat + "," + lon + ")"
    count = count + 1
print str(count) + " out of " + str(total) + \
" stations are geolocated."

Here’s the output of the above code:

mcroydon@mobilematt:~/py/kmlist$ python kmlist.py
Station ID: PAGM (63.46N,171.44W)
[... snip ...]
Station ID: KSHR (44.46.10N,106.58.08W)
422 out of 1775 stations are geolocated.

Well that’s a bummer. 422 out of 1775, or less than 25% of all stations are geolocated. While that’s still 422 more stations than I knew about previously, it’s a far cry from a majority of weather stations across the United States.

Another thing you will notice is that some stations appear to be expressed in degrees in decimal form (63.46N) while others appear to use Degrees/Minutes/Seconds (44.46.10N).

It’s gaps like these that can make working with “found” geolocation data frustrating.


96 Comments on “Geolocation Information Gaps”

  1. 1 blackberry 8900 curve said at 11:32 pm on February 6th, 2011:

    This is a very intriguing post, I was looking for this knowledge. Just so you know I found your web site when I was searching for blogs like mine, so please check out my site sometime and leave me a comment to let me know what you think.

  2. 2 porno izle said at 12:13 am on February 7th, 2011:

    Your site is very slow due to open

  3. 3 Fab Sri Lanka said at 2:24 am on February 7th, 2011:

    I actually love how it is easy on my eyes and also the information are well written. I am wondering how I can be notified whenever a new post has been made. I have subscribed to your rss feed which ought to do the trick!

  4. 4 buy neopoints said at 4:08 am on February 7th, 2011:

    Thanks for the nice blog. It was very useful for me. Keep sharing such ideas in the future as well. This was actually what I was looking for, and I am glad to came here! Thanks for sharing the such information with us.

  5. 5 fashion jewellery said at 4:14 am on February 7th, 2011:

    Anybody knows anything about island Korcula beaches?

  6. 6 fatburners said at 6:02 am on February 7th, 2011:

    Can I just say what a aid to seek out someone who actually is aware of what theyre speaking about on the internet. You definitely know how you can carry a difficulty to mild and make it important. More individuals must read this and understand this facet of the story. I cant imagine youre not more common because you definitely have the gift.

  7. 7 lanyards said at 10:54 pm on February 7th, 2011:

    Thanks for making the sincere attempt to speak about this. I think very robust approximately it and want to read more. If it’s OK, as you achieve extra intensive wisdom, may you thoughts adding more articles very similar to this one with additional info? It would be extremely useful and useful for me and my friends.

  8. 8 phen375 diet pills said at 10:42 am on February 8th, 2011:

    Spot on with this write-up, I really assume this website wants way more consideration. I’ll in all probability be once more to read much more, thanks for that info.

  9. 9 my site said at 10:58 am on February 8th, 2011:

    I admire the dear knowledge you offer on your articles. I can bookmark your weblog and feature my kids check up here generally. I’m reasonably sure they’ll learn loads of new stuff here than any one else!

  10. 10 Rihanna said at 4:46 pm on February 8th, 2011:

    Good write-up, I am a major time fan of the blog, continue to keep up the Very well written work, and I will probably be a ordinary visitor for a pretty long time.

  11. 11 Dell said at 5:58 pm on February 8th, 2011:

    I advise this site to my acquaintances so it could possibly be valuable & informative for them also. Ideal effort.

  12. 12 Dell said at 6:40 pm on February 8th, 2011:

    This article has lot of helpful and valuable information related to the topic and is also very nicely written. I really wish to see such more posts in future. Excellent posting!

  13. 13 Rihanna said at 7:15 pm on February 8th, 2011:

    I genuinely enjoyed this. It was very educational and helpful. I’ll return to check on upcoming posts

  14. 14 Dickson TN said at 2:36 am on February 9th, 2011:

    I actually love how it is easy on my eyes and also the information are well written. I am wondering how I can be notified whenever a new post has been made. I have subscribed to your rss feed which ought to do the trick!

  15. 15 Elvis said at 2:44 am on February 9th, 2011:

    Well , the view of the passage is totally correct ,your details is really reasonable and you guy give us valuable informative post

  16. 16 funny facebook status said at 5:41 am on February 9th, 2011:

    Unusual this publish is totaly unrelated to what I used to be searching google for, nevertheless it was indexed at the first page. I assume your doing something right if Google likes you sufficient to position you at the first page of a non related search.

  17. 17 Pioneer vsx-1020-k review said at 9:22 am on February 9th, 2011:

    I feel that is an enchanting aspect, it made me assume a bit. Thanks for sparking my considering cap. Now and again I get such a lot in a rut that I just really feel like a record.

  18. 18 Bali Reseguide said at 6:51 am on February 10th, 2011:

    really enjoyed what you have written actually. it really is not that simple to discover even remotely good posts to read (you know READ and not just browsing through it like some uniterested and flesh eating zombie before going somewhere else), so cheers mate for not wasting any of my time! :p

  19. 19 vyvoz stroitelnogo musora said at 2:16 pm on February 10th, 2011:

    vyvoz stroitelnogo musora spb…

    vyvoz musora…

  20. 20 PPI said at 9:22 pm on February 10th, 2011:

    I am very impress your this post, this is too much interesting. Thanks a lot…

  21. 21 dfehgiuoe said at 9:46 pm on February 10th, 2011:

    Such a great blog. I spend days on the internet reading blogs, about tons of different subjects. I must first of all give kudos to whoever created your theme and second of all for you for writing things i can only call a fantastic post.

  22. 22 paketresa said at 10:26 pm on February 10th, 2011:

    kinda appreciated what you wrote actually. it just is not that easy to find great text toactually read (you know READ and not simply browsing through it like a zombie before going somewhere else), so cheers man for not wasting any of my time! 🙂

  23. 23 lower blood pressure naturally said at 6:30 am on February 11th, 2011:

    So informative site! Big thanks! Thanks for a great time visiting your site. It’s really a pleasure knowing a site like this packed with great information. Thank you!

  24. 24 portable cell jammer said at 11:59 am on February 11th, 2011:

    I believe that may be an enchanting element, it made me suppose a bit. Thank you for sparking my considering cap. Every so often I get so much in a rut that I just really feel like a record.

  25. 25 Dell said at 12:03 pm on February 11th, 2011:

    I honestly like your web log material the way in which you put up the things…I’ve learn the matter with extraordinary interest.

  26. 26 Justin Bieber said at 3:47 pm on February 11th, 2011:

    i like this site.! have a lot of information.!!!.. these type of sites always magnetize me to submit comment…

  27. 27 Rihanna said at 4:21 pm on February 11th, 2011:

    I really loved reading your blog. It was tremendously properly authored and easy to undertand. Unlike other blogs I have read which are really not that fine. I also found your posts fairly interesting. In fact after reading, I had to go show it to my friend and he enjoyed it as effectively!

  28. 28 May Estain said at 2:44 am on February 12th, 2011:

    Hello, probably i¡¯m being a little off topic here, but I was browsing your site and it looks stimulating. I¡¯m writing a blog and trying to make it look cool, but everytime I touch it I mess something up. Did you design the blog yourself? Could someone with little experience do it, and add updates without messing it up? Anyways, good info on here, very informative.

  29. 29 patches said at 5:00 am on February 12th, 2011:

    you may have an awesome weblog right here! would you prefer to make some invite posts on my weblog?

  30. 30 sc1 said at 11:39 am on February 12th, 2011:

    Can I just say what a relief to seek out somebody who truly knows what theyre speaking about on the internet. You undoubtedly know how you can deliver a problem to light and make it important. Extra people must read this and perceive this side of the story. I cant imagine youre no more in style because you undoubtedly have the gift.

  31. 31 the worlds hardest riddle with answer said at 6:04 pm on February 13th, 2011:

    gordon91DDE66D@fireden.net jarred91DDE66D@fireden.net All you need to discern around computer tech support With the abundance of online computer tech supporter military talents providers

  32. 32 funny dogs said at 8:50 pm on February 13th, 2011:

    keep up the good work on the site. Do like it! :p Could maybe use some more updates more often, but i am sure you got better or other stuff to do , hehe. =p

  33. 33 short-term loans said at 2:53 am on February 14th, 2011:

    Good post. I study one thing tougher on different blogs everyday. It will at all times be stimulating to read content from other writers and practice a bit of one thing from their store. I’d prefer to make use of some with the content material on my weblog whether you don’t mind. Natually I’ll provide you with a hyperlink on your internet blog. Thanks for sharing.

  34. 34 zero friction marketing said at 7:14 pm on February 14th, 2011:

    You made certain nice points there. I did a search on the subject and found nearly all persons will go along with with your blog.

  35. 35 tory-burch-flip-flops said at 11:04 pm on February 14th, 2011:

    discount tory burch shoes…

    Tory Burch flip flop online sale.For the younger working expat women,look at these tory burch Shoes.these tory burch flip flops are definitely fun,yet the glossy design and round-toe stay these lovely.These tory burch shoes with multiple.New arrivel To…

  36. 36 Vigrx Plus pill said at 10:31 am on February 15th, 2011:

    Excellent points?I’d observe that as somebody who actually doesn’t write on blogs much (if truth be told, this may be my first publish), I don’t assume the time period ‘lurker’ is very becoming to a non-posting reader. It’s no longer your fault in the slightest degree , but most likely the blogosphere may just get a hold of a greater, non-creepy title for the ninety% of us that enjoy reading the content material .

  37. 37 375phen said at 4:47 pm on February 15th, 2011:

    WONDERFUL Post.thanks for share..extra wait .. …

  38. 38 Paketresorna said at 11:21 pm on February 16th, 2011:

    kinda liked what you posted actually. it just isn’t that simple to find good text to read (you know really READ and not simply browsing through it like a zombie before going to yet another post to just ignore), so cheers mate for really not wasting my time on the god forsaken internet. 😀

  39. 39 gordonii said at 4:37 am on February 17th, 2011:

    Aw, this was a very nice post. In idea I wish to put in writing like this additionally – taking time and actual effort to make a very good article… but what can I say… I procrastinate alot and on no account appear to get something done.

  40. 40 Gregory Despain said at 3:00 pm on February 17th, 2011:

    I love your design, where can I get it? please let me know. My email: en533@hotmail.com

  41. 41 oem cheap software said at 8:02 pm on February 17th, 2011:

    Those who do not learn from history are doomed to repeat it

  42. 42 meratol tablets said at 2:34 am on February 18th, 2011:

    A formidable share, I just given this onto a colleague who was doing slightly analysis on this. And he in reality purchased me breakfast as a result of I found it for him.. smile. So let me reword that: Thnx for the treat! However yeah Thnkx for spending the time to discuss this, I feel strongly about it and love reading more on this topic. If doable, as you develop into expertise, would you mind updating your blog with more details? It is extremely helpful for me. Huge thumb up for this blog submit!

  43. 43 web hosting delhi said at 3:09 am on February 18th, 2011:

    Thank you for making the honest strive to provide an explanation for this. I feel very strong approximately it and wish to learn more. If it’s OK, as you attain extra extensive knowledge, could you mind adding more posts very similar to this one with additional information? It could be extremely useful and helpful for me and my colleagues.

  44. 44 payday advance said at 8:48 am on February 18th, 2011:

    It’s arduous to find educated individuals on this subject, but you sound like you know what you’re speaking about! Thanks

  45. 45 praca wroclaw said at 5:41 am on February 21st, 2011:

    Not everything that is faced can be changed, but nothing can be changed until it is faced. ~James Baldwin

  46. 46 mental health said at 10:09 am on February 21st, 2011:

    Phyllis Bottome~ There are two ways of meeting difficulties You alter the difficulties or you alter yourself to meet them.