10.03.2010

Yahoo! Weather RSS Feed

Yahoo! Weather RSS Feed
The base URL for the Weather RSS feed is

http://weather.yahooapis.com/forecastrss

For the Weather RSS feed there are two parameters:

* w for WOEID.
* u for degrees units (Fahrenheit or Celsius).

WOEIDは
Where On Earth Identifiers

Spatial entities provided by Yahoo! GeoPlanet are referenced by a 32-bit identifier: the Where On Earth ID (WOEID). WOEIDs are unique and non-repetitive, and are assigned to all entities within the system. A WOEID, once assigned, is never changed or recycled. If a WOEID is deprecated it is mapped to its successor or parent WOEID, so that requests to the service using a deprecated WOEID are served transparently.

のこと。 詳しくはこちら

http://weather.yahoo.com/ の検索を使い、Auckland, NZ のWOEIDを調べてみると2348079。

気温の単位(parameter 'u')は、
f = Fahrenheit = 華氏
c = Celsius = 摂氏

Aucklandの天気情報(℃)を取得するには
http://weather.yahooapis.com/forecastrss?w=2348079&u=c
結果はこんな感じ。




あとは、
  1. 天気を表示する都市を決め、WOEIDリストを作成する
  2. WOEIDリストを元にcronで天気情報を取得する
  3. Latitude and Longitudeのお勉強
  4. Google Codesを活用して、ニュージーランドお天気マップを作る

0 件のコメント:

コメントを投稿