Skip to content

The goal of this gem is to provide marine buoy data from a variety of sources.

License

Notifications You must be signed in to change notification settings

minch/buoy_data

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

65 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

buoy_data

Description

The goal of this gem is to provide a super simple interface to marine buoy data from a variety of sources.

Currently only NOAA buoys are supported but adding more is planned.

Install

gem install buoy_data

Usage

The basic flow is:

  • instantiate a buoy_data object that will represent the target buoy
  • call its :get method
  • reference the given fields - for the latest reading - via convenient dot notation
require 'rubygems'
require 'buoy_data'
noaa_buoy = BuoyData::NoaaBuoy.new(41012) # St Augustine, FL
noaa_buoy.get
noaa_buoy.WVHT
 => "1.4" 
noaa_buoy.APD
 => "4.6"
# Wow the swell is pumping, I'm moving ;)!

All of the historical data for the given station can be obtained via (continuing from the above):

noaa_buoy.get_all

Which will provide an array of arrays (one array of the fields per row) for all the historical data available for the given station. In other words, for the station in the example above, 41012, you'd get all the data at:

http://www.ndbc.noaa.gov/data/realtime2/41012.spec

as an array of arrays.

Get a graph of the 5-day trend of Wave Height (WVHT) for the given station (google chart api):

noaa_buoy.google_chart_url

TODO

  • Add friendly / convenient methods for historical station data
  • Webmock for the specs

Note on Patches/Pull Requests

  • Fork the project.
  • Make your feature addition or bug fix.
  • Add tests for it. This is important so I don't break it in a future version unintentionally.
  • Commit, do not mess with rakefile, version, or history. (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
  • Send me a pull request. Bonus points for topic branches.

Copyright

Copyright (c) 2010 Adam Weller. See LICENSE for details.

About

The goal of this gem is to provide marine buoy data from a variety of sources.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages