美国国家气象局数据有 Ruby 客户端吗?

发布于 2024-08-16 08:57:55 字数 300 浏览 3 评论 0原文

唯一可免费用于商业用途的美国天气数据是美国国家气象局。我想用它。是否有用于访问它的 Ruby/Rails 库?

Perl 也会有帮助。他们提供了 Perl 示例。我会用它作为编写 Ruby 版本的指南。

The only US weather data that is available free for commercial use is the US National Weather Service. I'd like to use it. Is there a Ruby/Rails library for accessing it?

Perl would also be helpful. They provide a Perl example. I'd use it as a guide for writing the Ruby version.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

梦途 2024-08-23 08:57:55

除了 SOAP 服务之外,NWS 还提供 RESTful Web 服务,但是如果您的需求很简单,请考虑 github 上的 outoftime-noaa gem。它提供了一个简单的界面来获取预测和当前状况数据。

(请注意,它的依赖项之一尚未与 Ruby 1.9 兼容。)

The NWS provides a RESTful web service in addition to the SOAP service, but if your needs are simple, consider the outoftime-noaa gem on github. It provides a straightforward interface for obtaining forecast and current conditions data.

(Be warned that one of its dependencies is not yet compatible with Ruby 1.9.)

颜漓半夏 2024-08-23 08:57:55

有一个 Perl CPAN 模块,名为 Weather-NWS 使用 NDFD

There is a Perl CPAN module called Weather-NWS which uses the NDFD.

葬花如无物 2024-08-23 08:57:55

NDFD 是一项基于 SOAP 的 Web 服务。只需使用 Ruby SOAP 客户端向其发送正确的信息并处理响应即可。您对使用 Ruby 中的 SOAP 有疑问吗?

The NDFD is a SOAP-based web service. Just use a Ruby SOAP client to send it the right information and handle the response. Did you have a question about using SOAP from Ruby?

梦萦几度 2024-08-23 08:57:55

这取决于你想做什么。

如果您只想要一个或两个位置的小部件,那么 SOAP 接口就可以了。

如果您需要大量数据(或多个位置),那么 NOAA 希望您下载原始数据 grib2 数据(更新)每小时。一个简单的批处理作业就可以做到这一点。

It depends on what you're wanting to do.

If you just want a widget for a location or two the SOAP interface is fine.

If you want a large amount of data (or many locations) then NOAA wants you to download the raw grib2 data (updated) hourly. A simple batch job works for that.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文