| Title: | Tools for Easy Use of the 'e-Stat' API |
|---|---|
| Description: | Provides tools to use the 'e-Stat' API (<https://www.e-stat.go.jp/>), the portal site for Japanese government statistics. |
| Authors: | Mizuki Uchida [aut, cre] |
| Maintainer: | Mizuki Uchida <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.5.0 |
| Built: | 2026-07-21 05:00:44 UTC |
| Source: | https://github.com/cran/jpstat |
collect() downloads the statistical values selected from an estat
object with dplyr::filter(), dplyr::select(), and
navigatr::rekey(), and returns them as a tidy tibble. Large tables
are paginated automatically.
## S3 method for class 'estat' collect(x, n = "n", names_sep = "_", query = list(), limit = 100000L, ...) ## S3 method for class 'tbl_estat' collect(x, ...)## S3 method for class 'estat' collect(x, n = "n", names_sep = "_", query = list(), limit = 100000L, ...) ## S3 method for class 'tbl_estat' collect(x, ...)
x |
An |
n |
Name of the column that holds the observed values. |
names_sep |
Separator used to combine a classification's key
(e.g. |
query |
A list of additional queries passed to 'e-Stat's
|
limit |
Maximum number of records requested per page. 'e-Stat' caps this at 100000. |
... |
Ignored. |
A tibble.
## Not run: Sys.setenv(ESTAT_API_KEY = "Your API key") estat("https://www.e-stat.go.jp/dbview?sid=0003433219") |> dplyr::collect() ## End(Not run)## Not run: Sys.setenv(ESTAT_API_KEY = "Your API key") estat("https://www.e-stat.go.jp/dbview?sid=0003433219") |> dplyr::collect() ## End(Not run)
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().
estat( statsDataId, lang = c("J", "E"), query = list(), path = "rest/3.0/app/json" )estat( statsDataId, lang = c("J", "E"), query = list(), path = "rest/3.0/app/json" )
statsDataId |
A statistical data ID on 'e-Stat'. |
lang |
A language, Japanese ( |
query |
A list of additional queries. |
path |
An e-Stat API path. |
A estat object.
## Not run: Sys.setenv(ESTAT_API_KEY = "Your API key") estat("https://www.e-stat.go.jp/dbview?sid=0003433219") ## End(Not run)## Not run: Sys.setenv(ESTAT_API_KEY = "Your API key") estat("https://www.e-stat.go.jp/dbview?sid=0003433219") ## End(Not run)
Provides tools to use the 'e-Stat' API (https://www.e-stat.go.jp/), the portal site for Japanese government statistics.
Maintainer: Mizuki Uchida [email protected]
Authors:
Mizuki Uchida [email protected]
Useful links:
Report bugs at https://github.com/UchidaMizuki/jpstat/issues
summary() returns the table-level metadata (title, survey date,
publisher, and so on) of an estat object created by estat().
## S3 method for class 'estat' summary(object, ...) ## S3 method for class 'tbl_estat' summary(object, ...)## S3 method for class 'estat' summary(object, ...) ## S3 method for class 'tbl_estat' summary(object, ...)
object |
An |
... |
Ignored. |
A tibble of table information.