resas-api 0.1.6 → 0.2.0
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 +4 -4
- data/README.md +4 -2
- data/Rakefile +2 -0
- data/lib/resas/api.rb +31 -12
- data/lib/resas/api/api_ext/default_configuration.rb +54 -0
- data/lib/resas/api/client.rb +27 -22
- data/lib/resas/api/client/util/base_normalizer.rb +36 -0
- data/lib/resas/api/client/util/path_settings_normalizer.rb +37 -0
- data/lib/resas/api/client/util/request_settings_normalizer.rb +39 -0
- data/lib/resas/api/client_ext/connection.rb +56 -0
- data/lib/resas/api/client_ext/endpoint.rb +414 -0
- data/lib/resas/api/client_ext/request.rb +60 -0
- data/lib/resas/api/response/base_error.rb +22 -0
- data/lib/resas/api/response/body.rb +101 -0
- data/lib/resas/api/response/forbidden.rb +17 -0
- data/lib/resas/api/response/not_found.rb +17 -0
- data/lib/resas/api/response/too_many_requests.rb +17 -0
- data/lib/resas/api/tasks/make_methods.rake +144 -0
- data/lib/resas/api/version.rb +9 -1
- data/resas-api.gemspec +21 -16
- metadata +78 -26
- data/lib/resas/api/client/path.rb +0 -59
- data/lib/resas/api/client/response.rb +0 -15
- data/lib/resas/api/client/response/body.rb +0 -17
- data/lib/resas/api/client/response/body/result.rb +0 -22
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 33a1a7f2b35f48975f3b6ea00abdacab9f57a315
|
4
|
+
data.tar.gz: 513daf4bb44df639585d9e68ab0fcac7129f5e0d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3e19f18c647aed0008bbf680c20f90f37dc932121921dbca7f426942c5a28271d3f46aee57ba703c0d5ff0e8338486de4fe55b69bd7cbc257fcb6b95cb131700
|
7
|
+
data.tar.gz: 5075330f32f5233e4bc0551ef7d4a6ee557a61506cbe5697b1381afcf61a3cf44e4cefa22813ae2eb122ec366c5231333044cafcea63cefb9e679ef0e64f4c99
|
data/README.md
CHANGED
@@ -12,7 +12,7 @@ gem 'resas-api'
|
|
12
12
|
|
13
13
|
を指定してください。
|
14
14
|
|
15
|
-
また、環境変数 RESAS_API_ACCESS_KEY に、[https://opendata.resas-portal.go.jp/form.html]より取得したAPIキーを指定してください。
|
15
|
+
また、環境変数 RESAS_API_ACCESS_KEY に、[https://opendata.resas-portal.go.jp/form.html](https://opendata.resas-portal.go.jp/form.html) より取得したAPIキーを指定してください。
|
16
16
|
|
17
17
|
## Usage
|
18
18
|
|
@@ -32,8 +32,10 @@ res.body
|
|
32
32
|
|
33
33
|
## Contributing
|
34
34
|
|
35
|
-
バグの報告、プルリクエストは[https://github.com/nard-tech/resas-api
|
35
|
+
バグの報告、プルリクエストは[GitHub nard-tech/resas-api](https://github.com/nard-tech/resas-api)へどうぞ。
|
36
|
+
|
36
37
|
Bug reports and pull requests are welcome on GitHub at https://github.com/nard-tech/resas-api.
|
38
|
+
|
37
39
|
This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
38
40
|
|
39
41
|
|
data/Rakefile
CHANGED
data/lib/resas/api.rb
CHANGED
@@ -1,23 +1,42 @@
|
|
1
|
-
require '
|
2
|
-
require 'resas/api/client'
|
3
|
-
require 'resas/api/client/path'
|
4
|
-
require 'resas/api/client/response'
|
5
|
-
require 'resas/api/client/response/body'
|
6
|
-
require 'resas/api/client/response/body/result'
|
1
|
+
require 'nard/appi'
|
7
2
|
|
3
|
+
require_relative 'api/version'
|
4
|
+
require_relative 'api/api_ext/default_configuration'
|
5
|
+
|
6
|
+
# RESAS (Regional Economy Society Analyzing System) に関する機能を格納する名前空間
|
7
|
+
# @see {https://resas.go.jp/}
|
8
8
|
module Resas
|
9
|
+
|
10
|
+
# RESAS API を扱うための Gem - トップの名前空間
|
11
|
+
# @see {https://opendata.resas-portal.go.jp/}
|
12
|
+
# @see {https://opendata.resas-portal.go.jp/docs/api/v1-rc.1/index.html}
|
9
13
|
module Api
|
10
14
|
|
11
|
-
|
12
|
-
|
13
|
-
|
15
|
+
include Nard::Appi::ApiExt::Version
|
16
|
+
include Nard::Appi::ApiExt::Client
|
17
|
+
include Nard::Appi::ApiExt::Configuration
|
14
18
|
|
15
|
-
|
19
|
+
include ApiExt::DefaultConfiguration
|
16
20
|
|
21
|
+
include Nard::Appi::ApiExt::Initializer
|
22
|
+
|
23
|
+
# クライアントのオブジェクトを返すメソッド
|
24
|
+
# @param options [Hash] オプション
|
17
25
|
# @return [Resas::Api::Client]
|
18
|
-
def self.client
|
19
|
-
|
26
|
+
def self.client( options = {} )
|
27
|
+
super( Resas::Api, options )
|
28
|
+
end
|
29
|
+
|
30
|
+
def self.method_missing( method, *args, &block )
|
31
|
+
return super unless client.respond_to?( method )
|
32
|
+
client.send( method, *args, &block )
|
33
|
+
end
|
34
|
+
|
35
|
+
def self.respond_to?( method, include_all = false )
|
36
|
+
return client.respond_to?( method, include_all ) || super
|
20
37
|
end
|
21
38
|
|
22
39
|
end
|
23
40
|
end
|
41
|
+
|
42
|
+
require_relative 'api/client'
|
@@ -0,0 +1,54 @@
|
|
1
|
+
require 'faraday'
|
2
|
+
|
3
|
+
# RESAS (Regional Economy Society Analyzing System) に関する機能を格納する名前空間
|
4
|
+
# @see {https://resas.go.jp/}
|
5
|
+
module Resas
|
6
|
+
|
7
|
+
# RESAS API を扱うための Gem - トップの名前空間
|
8
|
+
# @see {https://opendata.resas-portal.go.jp/}
|
9
|
+
# @see {https://opendata.resas-portal.go.jp/docs/api/v1-rc.1/index.html}
|
10
|
+
module Api
|
11
|
+
|
12
|
+
module ApiExt
|
13
|
+
|
14
|
+
# RESAS API への接続の設定を扱うモジュール
|
15
|
+
# @note
|
16
|
+
# Constants:
|
17
|
+
# OPTIONS_KEYS
|
18
|
+
# DEFAULT_ACCESS_KEY, DEFAULT_BASE_URL, DEFAULT_FORMAT, DEFAULT_API_VERSION, DEFAULT_ADAPTER
|
19
|
+
module DefaultConfiguration
|
20
|
+
|
21
|
+
include Nard::Appi::ApiExt::DefaultConfiguration
|
22
|
+
|
23
|
+
default(
|
24
|
+
# APIキー
|
25
|
+
# @see {https://opendata.resas-portal.go.jp/form.html}
|
26
|
+
# @return [String]
|
27
|
+
access_key: ENV[ 'RESAS_API_ACCESS_KEY' ],
|
28
|
+
|
29
|
+
# RESAS API エンドポイント
|
30
|
+
# @return [String]
|
31
|
+
# @see {https://opendata.resas-portal.go.jp/docs/api/v1-rc.1/index.html}
|
32
|
+
base_url: 'https://opendata.resas-portal.go.jp',
|
33
|
+
|
34
|
+
# API から取得する値のフォーマット
|
35
|
+
# @return [String]
|
36
|
+
format: :json,
|
37
|
+
|
38
|
+
# 接続先の RESAS API のバージョン
|
39
|
+
# @return [String]
|
40
|
+
# @note Default: v1-rc.1
|
41
|
+
# @note この Gem のバージョンではない! Gem のバージョンは、Resas::Api::VERSION または Resas::Api.gem_version で取得する。
|
42
|
+
# @todo [Future] API の仕様が大幅に変更された場合の場合分け
|
43
|
+
api_version: 'v1-rc.1',
|
44
|
+
|
45
|
+
# Faraday で使用する HTTP クライアントの種類
|
46
|
+
# @return [Net::HTTP] (Default)
|
47
|
+
adapter: Faraday.default_adapter
|
48
|
+
)
|
49
|
+
|
50
|
+
end
|
51
|
+
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
data/lib/resas/api/client.rb
CHANGED
@@ -1,38 +1,43 @@
|
|
1
|
+
require 'nard/appi/client'
|
2
|
+
|
3
|
+
require 'active_support'
|
4
|
+
require 'active_support/core_ext'
|
1
5
|
require 'uri'
|
2
|
-
require 'net/http'
|
3
|
-
require 'singleton'
|
4
6
|
|
7
|
+
# RESAS (Regional Economy Society Analyzing System) に関する機能を格納する名前空間
|
8
|
+
# @see {https://resas.go.jp/}
|
5
9
|
module Resas
|
6
|
-
module Api
|
7
|
-
class Client
|
8
|
-
|
9
|
-
include Singleton
|
10
10
|
|
11
|
-
|
11
|
+
# RESAS API を扱うための Gem - トップの名前空間
|
12
|
+
# @see {https://opendata.resas-portal.go.jp/}
|
13
|
+
# @see {https://opendata.resas-portal.go.jp/docs/api/v1-rc.1/index.html}
|
14
|
+
module Api
|
12
15
|
|
13
|
-
|
14
|
-
|
16
|
+
# RESAS API へアクセスするクライアントのクラス
|
17
|
+
# @note 実際の通信には Gem 'Faraday' を利用する。
|
18
|
+
class Client < Nard::Appi::Client
|
15
19
|
|
16
|
-
|
17
|
-
|
20
|
+
filenames = [
|
21
|
+
:connection,
|
22
|
+
:request,
|
23
|
+
:endpoint,
|
24
|
+
]
|
18
25
|
|
19
|
-
|
20
|
-
|
26
|
+
filenames.each do | filename |
|
27
|
+
require File.expand_path( "../client_ext/#{ filename }", __FILE__ )
|
28
|
+
include Resas::Api::ClientExt.const_get( filename.capitalize )
|
21
29
|
end
|
22
30
|
|
23
|
-
def
|
24
|
-
|
25
|
-
response = @http.get( Resas::Api::Client::Path.get( api_version, *args ), @header )
|
26
|
-
Resas::Api::Client::Response.new( response )
|
31
|
+
def initialize( options = {} )
|
32
|
+
super( Resas::Api, options )
|
27
33
|
end
|
28
34
|
|
29
|
-
#
|
30
|
-
|
31
|
-
|
32
|
-
URI.join(
|
35
|
+
# API のエンドポイント(APIのバージョンを含む)
|
36
|
+
# @return [URI::HTTPS]
|
37
|
+
def base_endpoint
|
38
|
+
URI.join( base_url, "/api/#{ api_version }" )
|
33
39
|
end
|
34
40
|
|
35
41
|
end
|
36
|
-
|
37
42
|
end
|
38
43
|
end
|
@@ -0,0 +1,36 @@
|
|
1
|
+
require 'nard/appi/client/util/base_normalizer'
|
2
|
+
|
3
|
+
# RESAS (Regional Economy Society Analyzing System) に関する機能を格納する名前空間
|
4
|
+
# @see {https://resas.go.jp/}
|
5
|
+
module Resas
|
6
|
+
|
7
|
+
# RESAS API を扱うための Gem - トップの名前空間
|
8
|
+
# @see {https://opendata.resas-portal.go.jp/}
|
9
|
+
# @see {https://opendata.resas-portal.go.jp/docs/api/v1-rc.1/index.html}
|
10
|
+
module Api
|
11
|
+
|
12
|
+
class Client
|
13
|
+
|
14
|
+
# RESAS API を扱うための補助的な機能を格納する名前空間
|
15
|
+
module Util
|
16
|
+
|
17
|
+
# API へ送る情報を処理するクラス(基底クラス)
|
18
|
+
class BaseNormalizer < Nard::Appi::Client::Util::BaseNormalizer
|
19
|
+
|
20
|
+
private
|
21
|
+
|
22
|
+
def normalize_key( key )
|
23
|
+
key.to_s.camelize( :lower )
|
24
|
+
end
|
25
|
+
|
26
|
+
def normalize_value( value )
|
27
|
+
[ value ].flatten.join( ',' )
|
28
|
+
end
|
29
|
+
|
30
|
+
end
|
31
|
+
|
32
|
+
end
|
33
|
+
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
require_relative './base_normalizer'
|
2
|
+
|
3
|
+
# RESAS (Regional Economy Society Analyzing System) に関する機能を格納する名前空間
|
4
|
+
# @see {https://resas.go.jp/}
|
5
|
+
module Resas
|
6
|
+
|
7
|
+
# RESAS API を扱うための Gem - トップの名前空間
|
8
|
+
# @see {https://opendata.resas-portal.go.jp/}
|
9
|
+
# @see {https://opendata.resas-portal.go.jp/docs/api/v1-rc.1/index.html}
|
10
|
+
module Api
|
11
|
+
|
12
|
+
class Client
|
13
|
+
|
14
|
+
# RESAS API を扱うための補助的な機能を格納する名前空間
|
15
|
+
module Util
|
16
|
+
|
17
|
+
# RESAS API のパスを処理するクラス
|
18
|
+
class PathSettingsNormalizer < BaseNormalizer
|
19
|
+
|
20
|
+
attr_reader :full
|
21
|
+
|
22
|
+
private
|
23
|
+
|
24
|
+
def set_special_options( options )
|
25
|
+
@full = normalize_boolean_option( options, :full, default: true )
|
26
|
+
end
|
27
|
+
|
28
|
+
def special_options
|
29
|
+
[ @full ]
|
30
|
+
end
|
31
|
+
|
32
|
+
end
|
33
|
+
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
@@ -0,0 +1,39 @@
|
|
1
|
+
require_relative './base_normalizer'
|
2
|
+
|
3
|
+
# RESAS (Regional Economy Society Analyzing System) に関する機能を格納する名前空間
|
4
|
+
# @see {https://resas.go.jp/}
|
5
|
+
module Resas
|
6
|
+
|
7
|
+
# RESAS API を扱うための Gem - トップの名前空間
|
8
|
+
# @see {https://opendata.resas-portal.go.jp/}
|
9
|
+
# @see {https://opendata.resas-portal.go.jp/docs/api/v1-rc.1/index.html}
|
10
|
+
module Api
|
11
|
+
|
12
|
+
class Client
|
13
|
+
|
14
|
+
# RESAS API を扱うための補助的な機能を格納する名前空間
|
15
|
+
module Util
|
16
|
+
|
17
|
+
# RESAS API へのリクエストを処理するクラス
|
18
|
+
class RequestSettingsNormalizer < BaseNormalizer
|
19
|
+
|
20
|
+
attr_reader :parse_json, :generate_instance
|
21
|
+
|
22
|
+
private
|
23
|
+
|
24
|
+
def set_special_options( options )
|
25
|
+
@parse_json = normalize_boolean_option( options, :parse_json, default: true )
|
26
|
+
@generate_instance = normalize_boolean_option( options, :generate_instance, default: false )
|
27
|
+
end
|
28
|
+
|
29
|
+
def special_options
|
30
|
+
[ @parse_json, @generate_instance ]
|
31
|
+
end
|
32
|
+
|
33
|
+
end
|
34
|
+
|
35
|
+
end
|
36
|
+
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
@@ -0,0 +1,56 @@
|
|
1
|
+
require 'faraday'
|
2
|
+
require 'faraday_middleware'
|
3
|
+
|
4
|
+
# RESAS (Regional Economy Society Analyzing System) に関する機能を格納する名前空間
|
5
|
+
# @see {https://resas.go.jp/}
|
6
|
+
module Resas
|
7
|
+
|
8
|
+
# RESAS API を扱うための Gem - トップの名前空間
|
9
|
+
# @see {https://opendata.resas-portal.go.jp/}
|
10
|
+
# @see {https://opendata.resas-portal.go.jp/docs/api/v1-rc.1/index.html}
|
11
|
+
module Api
|
12
|
+
|
13
|
+
module ClientExt
|
14
|
+
|
15
|
+
# Gem 'Faraday' を用いて RESAS API へ接続する機能を格納するモジュール
|
16
|
+
module Connection
|
17
|
+
|
18
|
+
private
|
19
|
+
|
20
|
+
# @return [Faraday::Connection]
|
21
|
+
def connection( parse_json:, generate_instance: )
|
22
|
+
# @note
|
23
|
+
# {https://github.com/lostisland/faraday_middleware/wiki}
|
24
|
+
# Important: same as with Rack middleware, the order of middleware on a Faraday stack is significant. General guidelines:
|
25
|
+
# 1. put request middleware first, in order of importance;
|
26
|
+
# 2. put response middleware second, [in the reverse order of importance];
|
27
|
+
# 3. ensure that the adapter is always last.
|
28
|
+
Faraday::Connection.new( options_for_connection ) do | con |
|
29
|
+
con.request :json
|
30
|
+
|
31
|
+
# URL をエンコードする
|
32
|
+
con.use Faraday::Request::UrlEncoded
|
33
|
+
|
34
|
+
# 結果のJSONをパースする
|
35
|
+
con.response :json if parse_json
|
36
|
+
|
37
|
+
# アダプターを選択する
|
38
|
+
con.adapter( adapter )
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
# @return [Hash]
|
43
|
+
def options_for_connection
|
44
|
+
{
|
45
|
+
headers: {
|
46
|
+
'X-API-KEY' => access_key,
|
47
|
+
'Content-Type' => "application/#{ format };charset=UTF-8"
|
48
|
+
},
|
49
|
+
url: base_endpoint,
|
50
|
+
}
|
51
|
+
end
|
52
|
+
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
@@ -0,0 +1,414 @@
|
|
1
|
+
# RESAS (Regional Economy Society Analyzing System) に関する機能を格納する名前空間
|
2
|
+
# @see {https://resas.go.jp/}
|
3
|
+
module Resas
|
4
|
+
|
5
|
+
# RESAS API を扱うための Gem - トップの名前空間
|
6
|
+
# @see {https://opendata.resas-portal.go.jp/}
|
7
|
+
# @see {https://opendata.resas-portal.go.jp/docs/api/v1-rc.1/index.html}
|
8
|
+
module Api
|
9
|
+
|
10
|
+
module ClientExt
|
11
|
+
|
12
|
+
# 各 API のエンドポイントに直接アクセスするためのメソッドを格納するモジュール
|
13
|
+
# @see API概要 > 一覧 (https://opendata.resas-portal.go.jp/docs/api/v1-rc.1/index.html)
|
14
|
+
module Endpoint
|
15
|
+
|
16
|
+
# @!group 共通 > 都道府県、市区町村
|
17
|
+
|
18
|
+
# 都道府県一覧 (prefectures)
|
19
|
+
def prefectures( params = {} )
|
20
|
+
get( 'prefectures', params )
|
21
|
+
end
|
22
|
+
|
23
|
+
# 市区町村一覧 (cities)
|
24
|
+
def cities( params = {} )
|
25
|
+
get( 'cities', params )
|
26
|
+
end
|
27
|
+
|
28
|
+
# 旧市区町村一覧 (oldCities)
|
29
|
+
def old_cities( params = {} )
|
30
|
+
get( 'oldCities', params )
|
31
|
+
end
|
32
|
+
|
33
|
+
# @!group 共通 > 産業 (industries)
|
34
|
+
|
35
|
+
# 産業大分類 (industries/broad)
|
36
|
+
def industries_broad( params = {} )
|
37
|
+
get( 'industries/broad', params )
|
38
|
+
end
|
39
|
+
|
40
|
+
# 産業中分類 (industries/middle)
|
41
|
+
def industries_middle( params = {} )
|
42
|
+
get( 'industries/middle', params )
|
43
|
+
end
|
44
|
+
|
45
|
+
# 産業小分類 (industries/narrow)
|
46
|
+
def industries_narrow( params = {} )
|
47
|
+
get( 'industries/narrow', params )
|
48
|
+
end
|
49
|
+
|
50
|
+
# @!group 共通 > 職業 (jobs)
|
51
|
+
|
52
|
+
# 職業大分類 (jobs/broad)
|
53
|
+
def jobs_broad( params = {} )
|
54
|
+
get( 'jobs/broad', params )
|
55
|
+
end
|
56
|
+
|
57
|
+
# 職業中分類 (jobs/middle)
|
58
|
+
def jobs_middle( params = {} )
|
59
|
+
get( 'jobs/middle', params )
|
60
|
+
end
|
61
|
+
|
62
|
+
# @!group 共通 > 特許 (patents)
|
63
|
+
|
64
|
+
# 特許 技術分野 (patents/broad)
|
65
|
+
def patents_broad( params = {} )
|
66
|
+
get( 'patents/broad', params )
|
67
|
+
end
|
68
|
+
|
69
|
+
# 特許 技術テーマ (patents/middle)
|
70
|
+
def patents_middle( params = {} )
|
71
|
+
get( 'patents/middle', params )
|
72
|
+
end
|
73
|
+
|
74
|
+
# 特許権者の所在地 (patents/locations)
|
75
|
+
def patents_locations( params = {} )
|
76
|
+
get( 'patents/locations', params )
|
77
|
+
end
|
78
|
+
|
79
|
+
# @!group 共通 > 世界の地域・国 (regions)
|
80
|
+
|
81
|
+
# 取引地域 (regions/broad)
|
82
|
+
def regions_broad( params = {} )
|
83
|
+
get( 'regions/broad', params )
|
84
|
+
end
|
85
|
+
|
86
|
+
# 取引国 (regions/middle)
|
87
|
+
def regions_middle( params = {} )
|
88
|
+
get( 'regions/middle', params )
|
89
|
+
end
|
90
|
+
|
91
|
+
# @!group 共通 > 輸出入花火図 (tradeInfoItemTypes)
|
92
|
+
|
93
|
+
# 品目 大分類 (tradeInfoItemTypes/broad)
|
94
|
+
def trade_info_item_types_broad( params = {} )
|
95
|
+
get( 'tradeInfoItemTypes/broad', params )
|
96
|
+
end
|
97
|
+
|
98
|
+
# 品目 中分類 (tradeInfoItemTypes/middle)
|
99
|
+
def trade_info_item_types_middle( params = {} )
|
100
|
+
get( 'tradeInfoItemTypes/middle', params )
|
101
|
+
end
|
102
|
+
|
103
|
+
# 品目 小分類 (tradeInfoItemTypes/narrow)
|
104
|
+
def trade_info_item_types_narrow( params = {} )
|
105
|
+
get( 'tradeInfoItemTypes/narrow', params )
|
106
|
+
end
|
107
|
+
|
108
|
+
# @!group 共通 > その他
|
109
|
+
|
110
|
+
# 税関 (customs)
|
111
|
+
def customs( params = {} )
|
112
|
+
get( 'customs', params )
|
113
|
+
end
|
114
|
+
|
115
|
+
# 農業部門 (regions/agricultureDepartments)
|
116
|
+
def regions_agriculture_departments( params = {} )
|
117
|
+
get( 'regions/agricultureDepartments', params )
|
118
|
+
end
|
119
|
+
|
120
|
+
# @!group 産業 (industry)
|
121
|
+
|
122
|
+
# 特許一覧 (industry/patent/list)
|
123
|
+
def industry_patent_list( params = {} )
|
124
|
+
get( 'industry/patent/list', params )
|
125
|
+
end
|
126
|
+
|
127
|
+
# 国、税関別輸出入 (industry/export/fromTo)
|
128
|
+
def industry_export_from_to( params = {} )
|
129
|
+
get( 'industry/export/fromTo', params )
|
130
|
+
end
|
131
|
+
|
132
|
+
# 海外への企業進出動向向 (industry/globalmarket/perPref)
|
133
|
+
def industry_global_market_per_pref( params = {} )
|
134
|
+
get( 'industry/globalmarket/perPref', params )
|
135
|
+
end
|
136
|
+
|
137
|
+
# 産業別特化係数 (industry/power/forIndustry)
|
138
|
+
def industry_power_for_industry( params = {} )
|
139
|
+
get( 'industry/power/forIndustry', params )
|
140
|
+
end
|
141
|
+
|
142
|
+
# 地域別特化係数 (industry/power/forArea)
|
143
|
+
def industry_power_for_area( params = {} )
|
144
|
+
get( 'industry/power/forArea', params )
|
145
|
+
end
|
146
|
+
|
147
|
+
# 製造業事業所単位分析_継続・参入・退出事業所別の推移 (industry/power/forManufacturerEstablishments)
|
148
|
+
def industry_power_for_manufacturer_establishments( params = {} )
|
149
|
+
get( 'industry/power/forManufacturerEstablishments', params )
|
150
|
+
end
|
151
|
+
|
152
|
+
# @!group 農林水産業 > 農業 (agriculture)
|
153
|
+
|
154
|
+
# 農産物の出荷先別販売金額構成 (agriculture/sales/shipValue)
|
155
|
+
def agriculture_sales_ship_value( params = {} )
|
156
|
+
get( 'agriculture/sales/shipValue', params )
|
157
|
+
end
|
158
|
+
|
159
|
+
# 農産物の出荷先別経営体数割合 (agriculture/sales/shipRatio)
|
160
|
+
def agriculture_sales_ship_ratio( params = {} )
|
161
|
+
get( 'agriculture/sales/shipRatio', params )
|
162
|
+
end
|
163
|
+
|
164
|
+
# 経営耕地面積 (agriculture/land/forStacked)
|
165
|
+
def agriculture_land_for_stacked( params = {} )
|
166
|
+
get( 'agriculture/land/forStacked', params )
|
167
|
+
end
|
168
|
+
|
169
|
+
# 経営耕地面積規模別の経営体割合 (agriculture/land/Ratio)
|
170
|
+
def agriculture_land_ratio( params = {} )
|
171
|
+
get( 'agriculture/land/Ratio', params )
|
172
|
+
end
|
173
|
+
|
174
|
+
# 農地流動化率 (agriculture/land/forMobility)
|
175
|
+
def agriculture_land_for_mobility( params = {} )
|
176
|
+
get( 'agriculture/land/forMobility', params )
|
177
|
+
end
|
178
|
+
|
179
|
+
# 耕作放棄地率 (agriculture/land/forAbandonment)
|
180
|
+
def agriculture_land_for_abandonment( params = {} )
|
181
|
+
get( 'agriculture/land/forAbandonment', params )
|
182
|
+
end
|
183
|
+
|
184
|
+
# 農業部門別販売金額 (agriculture/all/forStacked)
|
185
|
+
def agriculture_all_for_stacked( params = {} )
|
186
|
+
get( 'agriculture/all/forStacked', params )
|
187
|
+
end
|
188
|
+
|
189
|
+
# 年間延べ農作業日数 (agriculture/crops/workingDays)
|
190
|
+
def agriculture_crops_working_days( params = {} )
|
191
|
+
get( 'agriculture/crops/workingDays', params )
|
192
|
+
end
|
193
|
+
|
194
|
+
# 農産物販売金額(人日あたり) (agriculture/crops/sales)
|
195
|
+
def agriculture_crops_sales( params = {} )
|
196
|
+
get( 'agriculture/crops/sales', params )
|
197
|
+
end
|
198
|
+
|
199
|
+
# 農業経営者・農業就業人口の年齢構成 (agriculture/crops/farmersAgeStructure)
|
200
|
+
def agriculture_crops_farmers_age_structure( params = {} )
|
201
|
+
get( 'agriculture/crops/farmersAgeStructure', params )
|
202
|
+
end
|
203
|
+
|
204
|
+
# 農業経営者・農業就業人口の平均年齢 (agriculture/crops/farmersAverageAge)
|
205
|
+
def agriculture_crops_farmers_average_age( params = {} )
|
206
|
+
get( 'agriculture/crops/farmersAverageAge', params )
|
207
|
+
end
|
208
|
+
|
209
|
+
# 農業生産関連事業の実施状況(経営体数) (agriculture/crops/relatedBusiness)
|
210
|
+
def agriculture_crops_related_business( params = {} )
|
211
|
+
get( 'agriculture/crops/relatedBusiness', params )
|
212
|
+
end
|
213
|
+
|
214
|
+
# 農業経営体の法人化率 (agriculture/crops/averageOfCorporate)
|
215
|
+
def agriculture_crops_average_of_corporate( params = {} )
|
216
|
+
get( 'agriculture/crops/averageOfCorporate', params )
|
217
|
+
end
|
218
|
+
|
219
|
+
# @!group 農林水産業 > 林業 (forestry)
|
220
|
+
|
221
|
+
# 林業総収入(総額) (forestry/income/forStacked)
|
222
|
+
def forestry_income_for_stacked( params = {} )
|
223
|
+
get( 'forestry/income/forStacked', params )
|
224
|
+
end
|
225
|
+
|
226
|
+
# 林産物販売金額(経営体あたり) (forestry/income/forSales)
|
227
|
+
def forestry_income_for_sales( params = {} )
|
228
|
+
get( 'forestry/income/forSales', params )
|
229
|
+
end
|
230
|
+
|
231
|
+
# 林作業請負収入(経営体あたり) (forestry/income/forContractRevenue)
|
232
|
+
def forestry_income_for_contract_revenue( params = {} )
|
233
|
+
get( 'forestry/income/forContractRevenue', params )
|
234
|
+
end
|
235
|
+
|
236
|
+
# 林産物販売金額帯別の経営体割合 (forestry/income/forSalesRatio)
|
237
|
+
def forestry_income_for_sales_ratio( params = {} )
|
238
|
+
get( 'forestry/income/forSalesRatio', params )
|
239
|
+
end
|
240
|
+
|
241
|
+
# 林作業請負収入金額帯別の経営体割合 (forestry/income/forContractRevenueRatio)
|
242
|
+
def forestry_income_for_contract_revenue_ratio( params = {} )
|
243
|
+
get( 'forestry/income/forContractRevenueRatio', params )
|
244
|
+
end
|
245
|
+
|
246
|
+
# 主要林業部門別延べ経営体数 (forestry/income/allPortfolio)
|
247
|
+
def forestry_income_all_portfolio( params = {} )
|
248
|
+
get( 'forestry/income/allPortfolio', params )
|
249
|
+
end
|
250
|
+
|
251
|
+
# 主要林業部門別延べ経営体数構成 (forestry/income/allForStacked)
|
252
|
+
def forestry_income_all_for_stacked( params = {} )
|
253
|
+
get( 'forestry/income/allForStacked', params )
|
254
|
+
end
|
255
|
+
|
256
|
+
# @!group 農林水産業 > 水産業 (fishery)
|
257
|
+
|
258
|
+
# 主要海面漁業種類別延べ経営体数構成 (fishery/sea/staple)
|
259
|
+
def fishery_sea_staple( params = {} )
|
260
|
+
get( 'fishery/sea/staple', params )
|
261
|
+
end
|
262
|
+
|
263
|
+
# 海面漁獲物等販売金額(総額) (fishery/sea/totalSales)
|
264
|
+
def fishery_sea_total_sales( params = {} )
|
265
|
+
get( 'fishery/sea/totalSales', params )
|
266
|
+
end
|
267
|
+
|
268
|
+
# 海面漁獲物等販売金額(経営体あたり) (fishery/sea/managementUnitSales)
|
269
|
+
def fishery_sea_management_unit_sales( params = {} )
|
270
|
+
get( 'fishery/sea/managementUnitSales', params )
|
271
|
+
end
|
272
|
+
|
273
|
+
# 海面漁獲物等販売金額帯別の経営体割合 (fishery/sea/sales)
|
274
|
+
def fishery_sea_sales( params = {} )
|
275
|
+
get( 'fishery/sea/sales', params )
|
276
|
+
end
|
277
|
+
|
278
|
+
# 海面漁獲物等出荷先別販売金額構成 (fishery/sea/shipValue)
|
279
|
+
def fishery_sea_ship_value( params = {} )
|
280
|
+
get( 'fishery/sea/shipValue', params )
|
281
|
+
end
|
282
|
+
|
283
|
+
# 海面漁獲物等出荷先別経営体数割合 (fishery/sea/shipRatio)
|
284
|
+
def fishery_sea_ship_ratio( params = {} )
|
285
|
+
get( 'fishery/sea/shipRatio', params )
|
286
|
+
end
|
287
|
+
|
288
|
+
# 海面養殖販売金額(総額) (fishery/sea/aquacultureTotalSales)
|
289
|
+
def fishery_sea_aquaculture_total_sales( params = {} )
|
290
|
+
get( 'fishery/sea/aquacultureTotalSales', params )
|
291
|
+
end
|
292
|
+
|
293
|
+
# 海面養殖販売金額(経営体あたり) (fishery/sea/aquacultureManagementUnitSales)
|
294
|
+
def fishery_sea_aquaculture_management_unit_sales( params = {} )
|
295
|
+
get( 'fishery/sea/aquacultureManagementUnitSales', params )
|
296
|
+
end
|
297
|
+
|
298
|
+
# 海面養殖販売金額帯別の経営体割合 (fishery/sea/aquacultureSales)
|
299
|
+
def fishery_sea_aquaculture_sales( params = {} )
|
300
|
+
get( 'fishery/sea/aquacultureSales', params )
|
301
|
+
end
|
302
|
+
|
303
|
+
# @!group 観光 (tourism)
|
304
|
+
|
305
|
+
# 指定地域への国籍別訪問者数 (tourism/foreigners/forFrom)
|
306
|
+
def tourism_foreigners_for_from( params = {} )
|
307
|
+
get( 'tourism/foreigners/forFrom', params )
|
308
|
+
end
|
309
|
+
|
310
|
+
# 指定国籍からの訪問者数 (tourism/foreigners/forTo)
|
311
|
+
def tourism_foreigners_for_to( params = {} )
|
312
|
+
get( 'tourism/foreigners/forTo', params )
|
313
|
+
end
|
314
|
+
|
315
|
+
# @!group 人口 (population)
|
316
|
+
|
317
|
+
# 人口の自然増減 (population/nature)
|
318
|
+
def population_nature( params = {} )
|
319
|
+
get( 'population/nature', params )
|
320
|
+
end
|
321
|
+
|
322
|
+
# 人口構成 (population/composition/perYear)
|
323
|
+
def population_composition_per_year( params = {} )
|
324
|
+
get( 'population/composition/perYear', params )
|
325
|
+
end
|
326
|
+
|
327
|
+
# 人口ピラミッド (population/composition/pyramid)
|
328
|
+
def population_composition_pyramid( params = {} )
|
329
|
+
get( 'population/composition/pyramid', params )
|
330
|
+
end
|
331
|
+
|
332
|
+
# 人口増減率 (population/sum/perYear)
|
333
|
+
def population_sum_per_year( params = {} )
|
334
|
+
get( 'population/sum/perYear', params )
|
335
|
+
end
|
336
|
+
|
337
|
+
# 出生数・死亡数/転入数・転出数 (population/sum/estimate)
|
338
|
+
def population_sum_estimate( params = {} )
|
339
|
+
get( 'population/sum/estimate', params )
|
340
|
+
end
|
341
|
+
|
342
|
+
# 将来人口推計 (population/future/cities)
|
343
|
+
def population_future_cities( params = {} )
|
344
|
+
get( 'population/future/cities', params )
|
345
|
+
end
|
346
|
+
|
347
|
+
# @!group 自治体比較 (municipality)
|
348
|
+
|
349
|
+
# 企業数 (municipality/company/perYear)
|
350
|
+
def municipality_company_per_year( params = {} )
|
351
|
+
get( 'municipality/company/perYear', params )
|
352
|
+
end
|
353
|
+
|
354
|
+
# 事業所数 (municipality/plant/perYear)
|
355
|
+
def municipality_plant_per_year( params = {} )
|
356
|
+
get( 'municipality/plant/perYear', params )
|
357
|
+
end
|
358
|
+
|
359
|
+
# 創業比率 (municipality/foundation/perYear)
|
360
|
+
def municipality_foundation_per_year( params = {} )
|
361
|
+
get( 'municipality/foundation/perYear', params )
|
362
|
+
end
|
363
|
+
|
364
|
+
# 一人当たり地方税 (municipality/taxes/perYear)
|
365
|
+
def municipality_taxes_per_year( params = {} )
|
366
|
+
get( 'municipality/taxes/perYear', params )
|
367
|
+
end
|
368
|
+
|
369
|
+
# 有効求人倍率 (municipality/job/perYear)
|
370
|
+
def municipality_job_per_year( params = {} )
|
371
|
+
get( 'municipality/job/perYear', params )
|
372
|
+
end
|
373
|
+
|
374
|
+
# 製造品出荷額 (municipality/manufacture/perYear)
|
375
|
+
def municipality_manufacture_per_year( params = {} )
|
376
|
+
get( 'municipality/manufacture/perYear', params )
|
377
|
+
end
|
378
|
+
|
379
|
+
# 従業者数(事業所単位) (municipality/employee/perYear)
|
380
|
+
def municipality_employee_per_year( params = {} )
|
381
|
+
get( 'municipality/employee/perYear', params )
|
382
|
+
end
|
383
|
+
|
384
|
+
# 付加価値額(企業単位) (municipality/value/perYear)
|
385
|
+
def municipality_value_per_year( params = {} )
|
386
|
+
get( 'municipality/value/perYear', params )
|
387
|
+
end
|
388
|
+
|
389
|
+
# 労働生産性(企業単位) (municipality/labor/perYear)
|
390
|
+
def municipality_labor_per_year( params = {} )
|
391
|
+
get( 'municipality/labor/perYear', params )
|
392
|
+
end
|
393
|
+
|
394
|
+
# 黒字赤字企業比率 (municipality/surplus/perYear)
|
395
|
+
def municipality_surplus_per_year( params = {} )
|
396
|
+
get( 'municipality/surplus/perYear', params )
|
397
|
+
end
|
398
|
+
|
399
|
+
# 一人当たり賃金 (municipality/wages/perYear)
|
400
|
+
def municipality_wages_per_year( params = {} )
|
401
|
+
get( 'municipality/wages/perYear', params )
|
402
|
+
end
|
403
|
+
|
404
|
+
# 年間商品販売額 (municipality/sales/perYear)
|
405
|
+
def municipality_sales_per_year( params = {} )
|
406
|
+
get( 'municipality/sales/perYear', params )
|
407
|
+
end
|
408
|
+
|
409
|
+
# @!endgroup
|
410
|
+
|
411
|
+
end
|
412
|
+
end
|
413
|
+
end
|
414
|
+
end
|