agroclimatology 0.3.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d72a0ebe4e9ff3716e6e0b13b3e0faee8ef486a7
4
- data.tar.gz: 471f62eab6082332e96a59e51607ceede40b13c8
3
+ metadata.gz: 9b3a357399f5589995ee04cfae23ba5367c3c2de
4
+ data.tar.gz: f660719dfa02bfcf386f7352b9c27495d7645a61
5
5
  SHA512:
6
- metadata.gz: 84838700d023860c35e31fd115cd6658b9f7221ac0ef09952a1da4a0ef40bbb8d8f5b0716edd8e9737c0238a8450381afa2d0e2e40076351877cd3956f827854
7
- data.tar.gz: df879cf2c0711afa55618edb9e8a24c61b2da42396df26fc58993a522da0409447bcf76e4dcbcd879c2ab0f1f6dfb5a17f61a64c8de594bfa3daa225d46bf7e5
6
+ metadata.gz: 161efcda8f75ecfb96951a9ebf91373cb590dff68d4dc60d2af970c88ddafbbc175fe2d0bdab4a56905c6ad143d19029c5d6b2df05efbbf9cb5f86af2c1ba368
7
+ data.tar.gz: 835232616c2d45bbb075dbb08f41b96cb3a850b114bd488a6ed1c7be0042cc295155a54255c1099ce974effd556a4648361a56c1dab93a22e08ff63704d0d17b
data/LICENSE.txt CHANGED
@@ -1,21 +1,29 @@
1
- The MIT License (MIT)
1
+ Copyright (c) 2016, Bryce Johnston
2
2
 
3
- Copyright (c) 2016 Bryce Johnston
3
+ All rights reserved.
4
4
 
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
5
+ Redistribution and use in source and binary forms, with or without
6
+ modification, are permitted provided that the following conditions are met:
11
7
 
12
- The above copyright notice and this permission notice shall be included in
13
- all copies or substantial portions of the Software.
8
+ 1. Redistributions of source code must retain the above copyright notice,
9
+ this list of conditions and the following disclaimer.
14
10
 
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- THE SOFTWARE.
11
+ 2. Redistributions in binary form must reproduce the above copyright notice,
12
+ this list of conditions and the following disclaimer in the documentation
13
+ and/or other materials provided with the distribution.
14
+
15
+ 3. Neither the name of the copyright holder nor the names of its
16
+ contributors may be used to endorse or promote products derived from this
17
+ software without specific prior written permission.
18
+
19
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
23
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29
+ POSSIBILITY OF SUCH DAMAGE.
data/README.md CHANGED
@@ -1,11 +1,16 @@
1
1
  # Agroclimatology
2
- [![Gem Version](https://badge.fury.io/rb/agroclimatology.svg)](https://badge.fury.io/rb/agroclimatology)
3
- [![Build Status](https://travis-ci.org/agruby/agroclimatology.svg?branch=master)](https://travis-ci.org/agruby/agroclimatology)
2
+
3
+ [![Gem Version](http://img.shields.io/gem/v/agroclimatology.svg)][gem]
4
+ [![Build Status](http://img.shields.io/travis/brycejohnston/agroclimatology.svg)][travis]
5
+
6
+ [gem]: https://rubygems.org/gems/agroclimatology
7
+ [travis]: http://travis-ci.org/brycejohnston/agroclimatology
4
8
 
5
9
  Ruby client for interacting with the [NASA (POWER) Agroclimatology Web Resource](http://power.larc.nasa.gov/cgi-bin/agro.cgi)
6
10
 
7
11
  Initial functionality is focused on getting solar radiation data
8
- for a given latitude and longitude. Other solar radiation and meteorological query parameters will be available in subsequent versions.
12
+ for a given latitude and longitude. Other solar radiation and meteorological
13
+ query parameters will be available in subsequent versions.
9
14
 
10
15
  ## Installation
11
16
 
@@ -39,9 +44,9 @@ Agroclimatology.fetch(latitude, longitude, year_start, year_end)
39
44
 
40
45
  ### Examples
41
46
 
42
- Fetch all solar radiation data available for Manhattan, KS, United States (1983 - Current Year)
47
+ Fetch all solar radiation data available for Dodge City, KS, United States
43
48
  ```ruby
44
- Agroclimatology.fetch(39.1836111, -96.5713889)
49
+ Agroclimatology.fetch(37.752798, -100.017079)
45
50
  ```
46
51
 
47
52
  Fetch solar radiation data for Woombye, QLD, Australia from 2015 - 2016
@@ -49,31 +54,29 @@ Fetch solar radiation data for Woombye, QLD, Australia from 2015 - 2016
49
54
  Agroclimatology.fetch(-26.660446, 152.964647, 2015, 2016)
50
55
  ```
51
56
 
52
- ```json
57
+ ```ruby
53
58
  [
54
59
  {
55
- ":year":"2015",
56
- ":day_of_year":"1",
57
- ":rad_atmosphere":"42.84",
58
- ":rad_surface":"27.47",
59
- ":rad_flux":"34.78"
60
+ :year => "2015",
61
+ :day_of_year => "1",
62
+ :rad_atmosphere => "42.84",
63
+ :rad_surface => "27.47",
64
+ :rad_flux => "34.78"
60
65
  },
61
66
  {
62
- ":year":"2015",
63
- ":day_of_year":"2",
64
- ":rad_atmosphere":"43.27",
65
- ":rad_surface":"23.00",
66
- ":rad_flux":"34.81"
67
- },
68
- {
69
- etc...
67
+ :year => "2015",
68
+ :day_of_year => "2",
69
+ :rad_atmosphere => "43.27",
70
+ :rad_surface => "23.00",
71
+ :rad_flux => 34.81"
70
72
  },
71
73
  ]
72
74
  ```
75
+ => {:year=>"2015", :day_of_year=>"1", :rad_atmosphere=>"42.84", :rad_surface=>"27.47", :rad_flux=>"34.78"}
73
76
 
74
77
  ### Output
75
78
 
76
- Returns JSON output containing records for every day included in year_start - year_end range
79
+ Ruby object containing array of hashes for every day included in year_start - year_end range
77
80
  - **year** - Year
78
81
  - **day_of_year** - Day of Year
79
82
  - **rad_atmosphere** - Average Top-of-atmosphere Insolation (MJ/m^2/day)
@@ -86,8 +89,12 @@ After checking out the repo, run `bin/setup` to install dependencies. Then, run
86
89
 
87
90
  ## Contributing
88
91
 
89
- Bug reports and pull requests are welcome on GitHub at https://github.com/agruby/agroclimatology.
92
+ Bug reports and pull requests are welcome on GitHub at https://github.com/brycejohnston/agroclimatology.
93
+
94
+ ## Acknowledgments
95
+
96
+ Data provided by [NASA (POWER) Agroclimatology Web Resource](http://power.larc.nasa.gov/cgi-bin/agro.cgi)
90
97
 
91
98
  ## License
92
99
 
93
- The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
100
+ The gem is available as open source under the terms of the BSD 3-Clause License (see [LICENSE.txt](https://github.com/brycejohnston/agroclimatology/blob/master/LICENSE.txt))
@@ -10,8 +10,8 @@ Gem::Specification.new do |spec|
10
10
  spec.email = ["johnstonbrc@gmail.com"]
11
11
  spec.summary = %q{Ruby client for interacting with the NASA (POWER) Agroclimatology Web Resource}
12
12
  spec.description = %q{Ruby client for interacting with the NASA (POWER) Agroclimatology Web Resource}
13
- spec.homepage = "https://github.com/agruby/agroclimatology"
14
- spec.license = "MIT"
13
+ spec.homepage = "https://github.com/brycejohnston/agroclimatology"
14
+ spec.license = "BSD 3-Clause"
15
15
  spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
16
16
  spec.bindir = "exe"
17
17
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
@@ -28,8 +28,7 @@ module Agroclimatology
28
28
  data << daily_record
29
29
  end
30
30
  end
31
- json = Oj.dump(data)
32
- puts json
31
+ return data
33
32
  else
34
33
  puts "Error: #{response.status}"
35
34
  end
@@ -1,3 +1,3 @@
1
1
  module Agroclimatology
2
- VERSION = "0.3.0"
2
+ VERSION = "0.3.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: agroclimatology
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bryce Johnston
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-05-21 00:00:00.000000000 Z
11
+ date: 2016-06-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty
@@ -100,9 +100,9 @@ files:
100
100
  - bin/setup
101
101
  - lib/agroclimatology.rb
102
102
  - lib/agroclimatology/version.rb
103
- homepage: https://github.com/agruby/agroclimatology
103
+ homepage: https://github.com/brycejohnston/agroclimatology
104
104
  licenses:
105
- - MIT
105
+ - BSD 3-Clause
106
106
  metadata: {}
107
107
  post_install_message:
108
108
  rdoc_options: []
@@ -125,3 +125,4 @@ signing_key:
125
125
  specification_version: 4
126
126
  summary: Ruby client for interacting with the NASA (POWER) Agroclimatology Web Resource
127
127
  test_files: []
128
+ has_rdoc: