雅虎天气网络服务
我正在尝试找到一种使用雅虎查询语言通过雅虎天气获取一些天气信息的方法。
由于我住在法国的尼斯市,以下查询返回错误:
select * from weather.forecast where location='Nice'
我已经协调了纬度和经度,那么如何将它们提供给 YQL 以返回天气信息?这项服务是全球范围内的还是仅适用于美国?
I'm trying to find a way to get some weather information with Yahoo Weather using Yahoo Query Language.
As I'm living in France, in a city called Nice, the following query returns an error:
select * from weather.forecast where location='Nice'
I have the latitude and longitude coordinated, so how can I give them to YQL to return the weather info? Is this service worldwide or just for the US?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您应该使用另一个 YQL 数据表。我已经尝试过这个查询,它工作正常:
这是 YQL 控制台
我已添加
unit=" c"
来获取摄氏温度,假设您想要这样。如果没有,请使用“f”。在内部,
weather.bylocation
表使用以下两件事:woeid
),请参阅下表的内部结构:
关于您关于协调纬度和经度的使用的第二个问题:
我不知道你是否可以使用它们,但也许你现在甚至不再需要它了,对吧?
也很好读:
http://developer.yahoo.com/weather/
http://developer.yahoo.com/geo/geoplanet/guide/concepts.html
You should use another YQL datatable instead. I have tried this query and it works fine:
This is the YQL console
I have added
unit="c"
to get it it Celsius, assuming that you want that. If not, use "f".Internally the
weather.bylocation
table is using the following two things:woeid
) for the location,See the internals of that table below:
Regarding your 2nd question about usage of latitude and longitude coordinated:
I don't know if you can use them but maybe you don't even need this anymore now, right?
Also good read:
http://developer.yahoo.com/weather/
http://developer.yahoo.com/geo/geoplanet/guide/concepts.html