GetAuWeather

Download recent Australian weather station data from the Australian Bureau of Meteorology's website and parse it into a dictionary of dictionaries
Download

GetAuWeather Ranking & Summary

Advertisement

  • Rating:
  • License:
  • BSD License
  • Price:
  • FREE
  • Publisher Name:
  • Luke Maurits
  • Publisher web site:
  • http://luke.maurits.id.au/

GetAuWeather Tags


GetAuWeather Description

Download recent Australian weather station data from the Australian Bureau of Meteorology's website and parse it into a dictionary of dictionaries GetAuWeather is a Python library for downloading recent Australian weather station data from the Australian Bureau of Meteorology's website and parsing it nicely into a dictionary of dictionaries so you can use it in other programs.If you dig around the Australian Bureau of Meteorology's website long enough, you may stumble upon a very cool page, generated by a Perl CGI script, which displays a veritable bounty of weather data in a simple row-based plain text format which is ideal for parsing by a program.GetAuWeather is a Python program to do just that. It downloads the page mentioned above using the urllib module and then busts the data up into a dictionary of dictionaries, which is a convenient format to use in other tasks - dumping this data into a database, .csv file, your screen, whatever.The file contains data for 747 weather stations around Australia. The data you can get for each observation are:* Station name* Station latitude and longitude* Day of month* Hour of observation* Visibility, in kilometers* Cloud, reported in octants (presumably eights of the sky covered by cloud)* Wind direction and speed in knots* Temperature in degrees Celcius* Relative humidity (percentage)* Rainfall in milimeters and hour of rainfall observation* Single word description of weather (e.g. "Fine", "Cldy", "Snow")* Maximum and minimum temperature over previous 24 hoursObviously, if the file formoat of the Bureau's webpage ever changes, this script will break. The folks at the Bureau are smart enough to include the date of the last format change in the page's output, so GetAuWeather makes sure this has not changed since the time it was written and will fail loudly if it has.Complete InstructionsGetAuWeather is very simple. The module contains exactly one function, getauweather. This function accepts no arguments and returns a single dictionary. The keys of this dictionry are strings representing the names of Australian weather stations. Some 747 stations are included. The value for each of these keys is a second dictionary. The key/value pairs of this second dictionary are weather observations from the relevant station. Requirements: · Python


GetAuWeather Related Software