{"id":13483007,"url":"https://github.com/brycejohnston/agroclimatology","last_synced_at":"2025-09-05T08:20:19.700Z","repository":{"id":56842327,"uuid":"59120863","full_name":"brycejohnston/agroclimatology","owner":"brycejohnston","description":"Ruby client for interacting with the NASA (POWER) Agroclimatology Web Resource","archived":false,"fork":false,"pushed_at":"2017-08-30T14:01:30.000Z","size":18,"stargazers_count":18,"open_issues_count":1,"forks_count":3,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-10-31T06:02:14.618Z","etag":null,"topics":["agriculture","climate","nasa","ruby","solar-radiation"],"latest_commit_sha":null,"homepage":"https://rubygems.org/gems/agroclimatology","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/brycejohnston.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-05-18T14:02:15.000Z","updated_at":"2024-04-15T18:48:02.000Z","dependencies_parsed_at":"2022-08-29T06:50:54.061Z","dependency_job_id":null,"html_url":"https://github.com/brycejohnston/agroclimatology","commit_stats":null,"previous_names":["cropquest/agroclimatology","beaorn/agroclimatology"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brycejohnston%2Fagroclimatology","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brycejohnston%2Fagroclimatology/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brycejohnston%2Fagroclimatology/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brycejohnston%2Fagroclimatology/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brycejohnston","download_url":"https://codeload.github.com/brycejohnston/agroclimatology/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247640557,"owners_count":20971555,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agriculture","climate","nasa","ruby","solar-radiation"],"created_at":"2024-07-31T17:01:07.407Z","updated_at":"2025-04-07T10:51:32.848Z","avatar_url":"https://github.com/brycejohnston.png","language":"Ruby","funding_links":[],"categories":["Climate, Environment and Weather"],"sub_categories":[],"readme":"# Agroclimatology\n\n[![Gem Version](http://img.shields.io/gem/v/agroclimatology.svg)][gem]\n[![Build Status](http://img.shields.io/travis/beaorn/agroclimatology.svg)][travis]\n\n[gem]: https://rubygems.org/gems/agroclimatology\n[travis]: http://travis-ci.org/beaorn/agroclimatology\n\nRuby client for interacting with the [NASA (POWER) Agroclimatology Web Resource](http://power.larc.nasa.gov/cgi-bin/agro.cgi)\n\nInitial functionality is focused on getting solar radiation data\nfor a given latitude and longitude. Other solar radiation and meteorological\nquery parameters will be available in subsequent versions.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'agroclimatology'\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install agroclimatology\n\n## Usage\n\nRequired params\n- latitude\n- longitude\n\nOptional params\n- year_start (default: 1983)\n- year_end (default: current year)\n\n```ruby\nAgroclimatology.fetch(latitude, longitude, year_start, year_end)\n```\n\n### Examples\n\nFetch all solar radiation data\n```ruby\nAgroclimatology.fetch(37.752798, -100.017079)\n```\n\nFetch solar radiation data from 2015 - 2016\n```ruby\nAgroclimatology.fetch(-26.660446, 152.964647, 2015, 2016)\n```\n\n```ruby\n[\n  {\n    :year =\u003e \"2015\",\n    :day_of_year =\u003e \"1\",\n    :rad_atmosphere =\u003e \"42.84\",\n    :rad_surface =\u003e \"27.47\",\n    :rad_flux =\u003e \"34.78\"\n  },\n  {\n    :year =\u003e \"2015\",\n    :day_of_year =\u003e \"2\",\n    :rad_atmosphere =\u003e \"43.27\",\n    :rad_surface =\u003e \"23.00\",\n    :rad_flux =\u003e \"34.81\"\n  },\n]\n```\n\n### Output\n\nRuby object containing array of hashes for every day included in year_start - year_end range\n- **year**                - Year\n- **day_of_year**         - Day of Year\n- **rad_atmosphere** - Average Top-of-atmosphere Insolation (MJ/m^2/day)\n- **rad_surface** - Average Insolation Incident On A Horizontal Surface (MJ/m^2/day)  \n- **rad_flux** - Average Downward Longwave Radiative Flux (MJ/m^2/day)  \n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment. To install this gem onto your local machine, run `bundle exec rake install`.\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/beaorn/agroclimatology.\n\n## Acknowledgments\n\nData provided by [NASA (POWER) Agroclimatology Web Resource](http://power.larc.nasa.gov/cgi-bin/agro.cgi)\n\n## License\n\nThe gem is available as open source under the terms of the MIT License (see [LICENSE.txt](https://github.com/beaorn/agroclimatology/blob/master/LICENSE.txt))\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrycejohnston%2Fagroclimatology","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrycejohnston%2Fagroclimatology","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrycejohnston%2Fagroclimatology/lists"}