Package 'jpstat'

Title: Tools for Easy Use of 'e-Stat', 'RESAS' API, Etc
Description: Provides tools to use API such as 'e-Stat' (<https://www.e-stat.go.jp/>), the portal site for Japanese government statistics, and 'RESAS' (Regional Economy and Society Analyzing System, <https://resas.go.jp>).
Authors: Mizuki Uchida [aut, cre]
Maintainer: Mizuki Uchida <[email protected]>
License: MIT + file LICENSE
Version: 0.4.0
Built: 2024-11-03 02:49:19 UTC
Source: https://github.com/uchidamizuki/jpstat

Help Index


Access 'e-Stat' data

Description

The estat() gets the meta-information of a statistical table by using getMetaInfo of the 'e-Stat' API, and returns an estat object that allows editing of meta-information by dplyr::filter() and dplyr::select().

Usage

estat(
  appId = deprecated(),
  statsDataId,
  lang = c("J", "E"),
  query = list(),
  path = "rest/3.0/app/json"
)

Arguments

appId

(Deprecated) an 'appId' of 'e-Stat' API.

statsDataId

A statistical data ID on 'e-Stat'.

lang

A language, Japanese ("J") or English ("E").

query

A list of additional queries.

path

An e-Stat API path.

Value

A estat object.

See Also

https://www.e-stat.go.jp

https://www.e-stat.go.jp/en

Examples

## Not run: 
estat("Your appId", "https://www.e-stat.go.jp/dbview?sid=0003433219")

## End(Not run)

Get table information for 'e-Stat' data

Description

Get table information for 'e-Stat' data

Usage

estat_table_info(x)

Arguments

x

A estat object.

Value

A tbl_df of the table information.


Tools for easy use of 'e-Stat' API

Description

logo

Provides tools to use API such as 'e-Stat' (https://www.e-stat.go.jp/), the portal site for Japanese government statistics, and 'RESAS' (Regional Economy and Society Analyzing System, https://resas.go.jp).

Author(s)

Maintainer: Mizuki Uchida [email protected]

See Also

Useful links:


Access 'RESAS' data

Description

[Experimental]

Usage

resas(
  X_API_KEY = deprecated(),
  path,
  query = list(),
  to_snakecase = TRUE,
  names_sep = "/",
  rectangle = TRUE
)

Arguments

X_API_KEY

(Deprecated) an 'X-API-KEY' of 'RESAS' API.

path

A 'RESAS' API path.

query

Additional queries.

to_snakecase

Whether the parameters and responses should be named as snake cases or not?

names_sep

A character that separates the names of the responses.

rectangle

Whether to rectangle the data or not?

Value

A resas object.

See Also

https://opendata.resas-portal.go.jp/


Information on real estate transaction prices API

Description

[Experimental]

Usage

webland_trade(lang = c("ja", "en"))

webland_city(lang = c("ja", "en"))

Arguments

lang

Language.

Details

Collect data from the information on real estate transaction prices API provided by Japan's Ministry of Land, Infrastructure, Transport and Tourism.

Value

webland_trade() a webland_trade object. By creating a query with itemise() and applying collect(), The real estate transaction prices are collected.

webland_city() a webland_city object. Obtains a list of target municipalities in the same way as webland_trade().

Examples

## Not run: 
# Collect trade data
webland_trade() |>
  itemise(from = "20151",
          to = "20152",
          city_code = "13102") |>
  collect()

# Collect target municipalities
webland_city() |>
  itemise(pref_code = "13") |>
  collect()

## End(Not run)