Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/johno/snotel-old
Ruby client for accessing SNOTEL station data.
https://github.com/johno/snotel-old
Last synced: 2 months ago
JSON representation
Ruby client for accessing SNOTEL station data.
- Host: GitHub
- URL: https://github.com/johno/snotel-old
- Owner: johno
- License: mit
- Created: 2014-09-07T21:55:36.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2015-09-28T20:27:09.000Z (over 9 years ago)
- Last Synced: 2024-10-19T17:28:24.963Z (3 months ago)
- Language: Ruby
- Homepage:
- Size: 1.11 MB
- Stars: 2
- Watchers: 4
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Snotel
[![Build Status](https://travis-ci.org/johnotander/snotel.svg?branch=master)](https://travis-ci.org/johnotander/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
```ruby
Snotel.get_station_data # => [ ... ]
```### Daily Snowfall Data
```ruby
# 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
```ruby
# 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](http://powderlin.es/api.html):## Contributing
1. Fork it ( https://github.com/firstchair-io/snotel/fork )
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create a new Pull RequestCrafted with <3 by [John Otander](http://johnotander.com).