{"id":31944687,"url":"https://github.com/altabering/altadata-ruby","last_synced_at":"2026-07-01T16:32:13.976Z","repository":{"id":62553203,"uuid":"308609331","full_name":"altabering/altadata-ruby","owner":"altabering","description":"ALTADATA Ruby client provides convenient access to the ALTADATA API from applications written in the Ruby language.","archived":false,"fork":false,"pushed_at":"2020-12-29T15:19:59.000Z","size":21,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-10-23T10:51:34.627Z","etag":null,"topics":["altadata","api-client","ruby"],"latest_commit_sha":null,"homepage":"","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/altabering.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-10-30T11:22:30.000Z","updated_at":"2024-01-14T21:04:11.000Z","dependencies_parsed_at":"2022-11-03T04:30:33.571Z","dependency_job_id":null,"html_url":"https://github.com/altabering/altadata-ruby","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/altabering/altadata-ruby","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/altabering%2Faltadata-ruby","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/altabering%2Faltadata-ruby/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/altabering%2Faltadata-ruby/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/altabering%2Faltadata-ruby/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/altabering","download_url":"https://codeload.github.com/altabering/altadata-ruby/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/altabering%2Faltadata-ruby/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35015053,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-01T02:00:05.325Z","response_time":130,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["altadata","api-client","ruby"],"created_at":"2025-10-14T10:44:32.802Z","updated_at":"2026-07-01T16:32:13.960Z","avatar_url":"https://github.com/altabering.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ALTADATA Ruby Client\n\n[![Build status](https://github.com/altabering/altadata-ruby/workflows/build/badge.svg)](https://github.com/altabering/altadata-ruby/actions)\n[![Gem Version](https://badge.fury.io/rb/altadata.svg)](https://rubygems.org/gems/altadata)\n\n[ALTADATA](https://www.altadata.io) is a Curated Data Marketplace. This Ruby gem provides convenient access to the ALTADATA API from applications written in the Ruby language. With this Ruby gem, developers can build applications around the ALTADATA API without having to deal with accessing and managing requests and responses.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'altadata'\n```\n\nAnd then execute:\n\n    $ bundle install\n\nOr install it yourself as:\n\n    $ gem install altadata\n\n\n## Quickstart\n\nObtain an API key in your dashboard and initialize the client:\n\n```ruby\nrequire 'altadata'\n\nclient = Altadata::Client.new(api_key='YOUR_API_KEY')\n```\n\n## Retrieving Data\n\nYou can get the entire data with the code below.\n\n```ruby\ndata = client.get_data(product_code = PRODUCT_CODE).load\n```\n\n## Retrieving Subscription Info\n\nYou can get your subscription info with the code below.\n\n```ruby\nproduct_list = client.list_subscription\n```\n\n## Retrieving Data Header Info\n\nYou can get your data header with the code below.\n\n```ruby\nclient.get_header(product_code = PRODUCT_CODE)\n```\n\n## Retrieving Data with Conditions\n\nYou can get data with using various conditions.\n\nThe columns you can apply these filter operations to are limited to the **filtered columns**.\n\n\u003e You can find the **filtered columns** in the data section of the data product page.\n\n### equal condition\n\n```ruby\nPRODUCT_CODE = 'co_10_jhucs_03'\n\ndata =\n    client.get_data(product_code = PRODUCT_CODE)\n        .equal(condition_column = 'province_state', condition_value = 'Alabama')\n        .load\n```\n\n### not equal condition\n\n```ruby\nPRODUCT_CODE = 'co_10_jhucs_03'\n\ndata =\n    client.get_data(product_code = PRODUCT_CODE)\n        .not_equal(condition_column = 'province_state', condition_value = 'Montana')\n        .load\n```\n\n### in condition\n\n```ruby\nPRODUCT_CODE = 'co_10_jhucs_03'\n\ndata =\n    client.get_data(product_code = PRODUCT_CODE)\n        .condition_in(condition_column = 'province_state', condition_value = %w[Montana Utah])\n        .load\n```\n\n\u003e condition_value parameter of condition_in method must be Array\n\n### not in condition\n\n```ruby\nPRODUCT_CODE = 'co_10_jhucs_03'\n\ndata =\n    client.get_data(product_code = PRODUCT_CODE)\n        .condition_not_in(condition_column = 'province_state', condition_value = %w[Montana Utah Alabama])\n        .load\n```\n\n\u003e condition_value parameter of condition_not_in method must be Array\n\n### sort operation\n\n```ruby\nPRODUCT_CODE = 'co_10_jhucs_03'\n\ndata =\n    client.get_data(product_code = PRODUCT_CODE)\n        .sort(order_column = 'reported_date', order_method = 'desc')\n        .load\n```\n\n\u003e Default value of order_method parameter is 'asc' and order_method parameter must be 'asc' or 'desc'\n\n### select specific columns\n\n```ruby\nPRODUCT_CODE = 'co_10_jhucs_03'\n\ndata =\n    client.get_data(product_code = PRODUCT_CODE)\n        .select(selected_column = %w[reported_date province_state mortality_rate])\n        .load\n```\n\n\u003e selected_column parameter of select method must be Array\n\n### get the specified amount of data\n\n```ruby\nPRODUCT_CODE = 'co_10_jhucs_03'\n\ndata =\n    client.get_data(product_code = PRODUCT_CODE, limit = 20)\n        .load\n```\n\n## Retrieving Data with Multiple Conditions\n\nYou can use multiple condition at same time.\n\n```ruby\nPRODUCT_CODE = 'co_10_jhucs_03'\n\ndata =\n    client.get_data(product_code = PRODUCT_CODE, limit = 100)\n        .condition_in(condition_column = \"province_state\", condition_value = %w[Montana Utah])\n        .sort(order_column = 'mortality_rate', order_method = 'desc')\n        .select(selected_column = %w[reported_date province_state mortality_rate])\n        .load\n```\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.\n\nTo install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).\n\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](https://github.com/altabering/altadata-ruby/blob/master/LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faltabering%2Faltadata-ruby","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faltabering%2Faltadata-ruby","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faltabering%2Faltadata-ruby/lists"}