| Title: | Tools for Easy Use of 'e-Stat' API |
|---|---|
| Description: | Provides tools for using the API of 'e-Stat' (<https://www.e-stat.go.jp/>), a portal site for Japanese government statistics. Includes functions for automatic query generation, data collection and formatting. |
| Authors: | Mizuki Uchida [aut, cre] |
| Maintainer: | Mizuki Uchida <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.1.0 |
| Built: | 2026-05-09 08:43:39 UTC |
| Source: | https://github.com/cran/japanstat |
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 filter and select.
estat(statsDataId, appId = NULL, lang = NULL, query = NULL)estat(statsDataId, appId = NULL, lang = NULL, query = NULL)
statsDataId |
A statistical data ID on 'e-Stat'. |
appId |
An 'appId' of 'e-Stat' API. |
lang |
A language, Japanese ( |
query |
A list of additional queries. |
A estat object.
## Not run: estat("https://www.e-stat.go.jp/dbview?sid=0003433219") ## End(Not run)## Not run: estat("https://www.e-stat.go.jp/dbview?sid=0003433219") ## End(Not run)
estat object key to edit.Determine which estat object key to edit.
estat_activate(x, pattern, new_name = NULL) estat_activate_tab(x, new_name = NULL) estat_activate_time(x, new_name = NULL) estat_activate_area(x, new_name = NULL) estat_activate_cat(x, n, new_name = NULL)estat_activate(x, pattern, new_name = NULL) estat_activate_tab(x, new_name = NULL) estat_activate_time(x, new_name = NULL) estat_activate_area(x, new_name = NULL) estat_activate_cat(x, n, new_name = NULL)
x |
A |
pattern |
Pattern to look for. |
new_name |
New column name. |
n |
A category number. |
The estat object which the selected key is active.
estat_activate_tab(estat_census_2020) estat_activate_cat(estat_census_2020, 1) estat_activate_area(estat_census_2020) estat_activate_time(estat_census_2020)estat_activate_tab(estat_census_2020) estat_activate_cat(estat_census_2020, 1) estat_activate_area(estat_census_2020) estat_activate_time(estat_census_2020)
Population of the 2020 census
estat_census_2020estat_census_2020
An object of class estat of length 6.
https://www.e-stat.go.jp/dbview?sid=0003433219
Download 'e-Stat' data
estat_download(x, value_name = "value", query = NULL)estat_download(x, value_name = "value", query = NULL)
x |
A |
value_name |
A column name of the value. |
query |
A list of additional queries. |
A tbl of the downloaded data.
## Not run: estat_download(estat_census_2020) ## End(Not run)## Not run: estat_download(estat_census_2020) ## End(Not run)
Set attributes of 'e-Stat' API
estat_set(i, value)estat_set(i, value)
i |
An attribute name. |
value |
An attribute value |
No output..
estat_set("estat_limit_downloads", 1e5) estat_set("estat_limit_items", 1e2)estat_set("estat_limit_downloads", 1e5) estat_set("estat_limit_items", 1e2)
Set 'appId' of 'e-Stat' API
estat_set_apikey(appId)estat_set_apikey(appId)
appId |
An 'appId' of 'e-Stat' API. |
No output.
estat_set_apikey("Your e-Stat appId")estat_set_apikey("Your e-Stat appId")
Set language of 'e-Stat' API
estat_set_lang(lang)estat_set_lang(lang)
lang |
A language of 'e-Stat' API, Japanese ( |
No output.
estat_set_lang("J")estat_set_lang("J")
Get table information for 'e-Stat' data
estat_table_info(x)estat_table_info(x)
x |
A |
A tbl of the table information.
Provides tools for using the API of 'e-Stat' (<https://www.e-stat.go.jp/>), a portal site for Japanese government statistics. Includes functions for automatic query generation, data collection and formatting.
Maintainer: Mizuki Uchida [email protected]
Useful links:
Report bugs at https://github.com/UchidaMizuki/japanstat/issues