Envorment Canada XML DataSet Service

To use the service you need 2 things

  1. A date
  2. A weather station ID

For my examples i will be using the following data

Date:

May 7th 2011

Station:

WINNIPEG RICHARDSON AWOS MANITOBA
Latitude: 49°55’00.000” N   
Longitude: 97°14’00.000” W    
Elevation: 238.70 m
Climate ID: 5023226    
WMO ID: 71852   
TC ID: YWG
ID: 47407

To find the Station ID for a weather station near you you can use this google map I created.

http://maps.google.ca/maps/ms?hl=en&ie=UTF8&msa=0&msid=110896327429032700382.00048bdcb7e0dd16f3ebd&z=3

Environment Canada Station URL:

http://climate.weatheroffice.gc.ca/climateData/dailydata_e.html?timeframe=2&StationID=47407&Year=2011&Month=5&Day=01

Daily Statistics

XML Environment Canada Station URL:

http://climate.weatheroffice.gc.ca/climateData/bulkdata_e.html?timeframe=2&StationID=47407&Year=2011&Month=5&Day=6&format=xml

Notice the above changes to the URL for the default Environment Canada page and the XML version. The date variable changed as well but seems to be ignored.

Below is a snapshot of what kind of data will be returned.

Example:

<stationdata day=”6” month=”5” year=”2011” quality=”*”>
    <maxtemp description=”Maximum Temperature” units=”°C”>19.80</maxtemp>
    <mintemp description=”Minimum Temperature” units=”°C”>4.00</mintemp>
    <meantemp description=”Mean Temperature” units=”°C”>11.90</meantemp>
    <totalrain description=”Total Rain” flag=”M” units=”mm”/>
    <totalsnow description=”Total Snow” flag=”M” units=”cm”/>
    <totalprecipitation description=”Total Precipitation” units=”mm”>0.00</totalprecipitation>
    <snowonground description=”Snow on Ground” units=”cm”/>
    <dirofmaxgust description=”Direction of Maximum Gust” units=”10’s Deg”>14.00</dirofmaxgust>
    <speedofmaxgust description=”Speed of Maximum Gust” units=”km/h”>32.00</speedofmaxgust>
    <heatdegdays description=”Heating Degree Days” units=”°C”>6.10</heatdegdays>
    <cooldegdays description=”Cooling Degree Days” units=”°C”>0.00</cooldegdays>
</stationdata>

<stationdata day=”7” month=”5” year=”2011”>
    <maxtemp description=”Maximum Temperature” units=”°C”/>
    <mintemp description=”Minimum Temperature” units=”°C”/>
    <meantemp description=”Mean Temperature” units=”°C”/>
    <totalrain description=”Total Rain” units=”mm”/>
    <totalsnow description=”Total Snow” units=”cm”/>
    <totalprecipitation description=”Total Precipitation” units=”mm”/>
    <snowonground description=”Snow on Ground” units=”cm”/>
    <dirofmaxgust description=”Direction of Maximum Gust” units=”10’s Deg”/>
    <speedofmaxgust description=”Speed of Maximum Gust” units=”km/h”/>
    <heatdegdays description=”Heating Degree Days” units=”°C”/>
    <cooldegdays description=”Cooling Degree Days” units=”°C”/>
</stationdata>

Notice how the data-set also has blank entries for future dates, I assume these get filled in at the end of the day.

Hourly Statistics

If we change the time-frame variable we will receive an hourly incremented data-set for the entire year.

http://climate.weatheroffice.gc.ca/climateData/bulkdata_e.html?timeframe=1&StationID=47407&Year=2011&Month=5&Day=6&format=xml

Below is a snapshot of what kind of data will be returned.

<stationdata day=”6” hour=”0” minute=”0” month=”5” year=”2011” quality=” “>
    <temp description=”Temperature” units=”°C”>6.90</temp>
    <dptemp description=”Dew Point Temperature” units=”°C”>3.60</dptemp>
    <visibility description=”Visibility” units=”km”>15.00</visibility>
    <relhum description=”Relative Humidity” units=”%”>79.00</relhum>
    <winddir description=”Wind Direction” units=”10’s deg”>16.00</winddir>
    <windspd description=”Wind Speed” units=”km/h”>9.00</windspd>
    <stnpress description=”Station Pressure” units=”kPa”>98.20</stnpress>
    <humidex description=”Humidex”/><windchill description=”Wind Chill”/>
    <weather description=”Weather”/>
</stationdata>

<stationdata day=”6” hour=”1” minute=”0” month=”5” year=”2011” quality=” “>
    <temp description=”Temperature” units=”°C”/>
    <dptemp description=”Dew Point Temperature” units=”°C”/>
    <visibility description=”Visibility” units=”km”/>
    <relhum description=”Relative Humidity” units=”%”/>
    <winddir description=”Wind Direction” units=”10’s deg”/>
    <windspd description=”Wind Speed” units=”km/h”/>
    <stnpress description=”Station Pressure” units=”kPa”/>
    <humidex description=”Humidex”/>
    <windchill description=”Wind Chill”/>
    <weather description=”Weather”/>
</stationdata>

Notice the different types of data being reported in this hourly data-set compared to the daily data-set

This review will only be covering daily and hourly results. Monthly and Almanac results are available but are fairly inaccurate.