No commit activity in last 3 years
No release in over 3 years
Tottori Open Data PM2.5 API
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.14
>= 0
~> 5.0
>= 0
~> 10.0

Runtime

 Project Readme

Tottori OpenData PM2.5 API

Gem Version

This API gets data which is the concentration of PM2.5 (fine particulate matter) in the atmosphere in Tottori Prefecture, Japan from http://tottori-taiki.users.tori-info.co.jp/taiki/pc/graph/ as Open Data licensed CC-BY.

Installation

$ gem install tottori-opendata-pm25-api

Usage

CLI:

$ tottori-opendata-pm25-api | jq . | head
[
  {
    "name": "県庁西町分庁舎",
    "values": [
      {
        "time": "2017-01-23T00:00:00.000+09:00",
        "value": 9
      },
      {
        "time": "2017-01-23T01:00:00.000+09:00",

API:

require 'tottori-opendata-pm25-api'
require 'time'
require 'json'
require 'active_support/json'

ActiveSupport::JSON::Encoding.use_standard_json_time_format = true
puts Tottori::OpenData::PM25::API.get(Time.now).to_json

License

The gem is available as open source under the terms of the MIT License.