Project

buoy_data

0.0
No commit activity in last 3 years
No release in over 3 years
The goal of this gem is to provide marine buoy data from a variety of sources
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Development

>= 0

Runtime

 Project Readme

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.