Snotel
This is a gem for a Ruby client to access SNOTEL data from the NRCS.
Installation
Add this line to your application's Gemfile:
gem 'snotel'
And then execute:
$ bundle
Or install it yourself as:
$ gem install snotel
Usage
Get all station data
Snotel.get_station_data # => [ ... ]
Daily Snowfall Data
# Get the last day
Snotel.daily(:snowbird) # => [{:date=>"2014-09-13", :snow_water_equivalent_in=>"0.0", :change_in_snow_water_equivalent_in=>"0.0", :snow_depth_in=>nil, :change_in_snow_depth_in=>nil}]
# Get the last week
Snotel.daily(:snowbird, 7) # => [ ... ]
Hourly Snowfall Data
# Get the last 24 hours
Snotel.hourly(:lookout) # => [ ... ]
# Get the last 72 hours
Snotel.hourly(:lookout, 72) # => [ ... ]
Acknowledgements
This gem is essentially an abstraction of the awesome work done by the developers for the powderlin.es api: https://github.com/bobbymarko/powderlines-api
Contributing
- Fork it ( https://github.com/firstchair-io/snotel/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request
Crafted with <3 by John Otander.