| Type: | Package |
| Title: | Tools for Easy Use of 'e-Stat' API |
| Version: | 0.1.0 |
| 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. |
| License: | MIT + file LICENSE |
| URL: | https://github.com/UchidaMizuki/japanstat |
| BugReports: | https://github.com/UchidaMizuki/japanstat/issues |
| Encoding: | UTF-8 |
| LazyData: | true |
| Suggests: | keyring (≥ 1.2.0), testthat (≥ 3.0.0) |
| Config/testthat/edition: | 3 |
| RoxygenNote: | 7.1.2 |
| Imports: | cli(≥ 3.1.0), dplyr (≥ 1.0.7), httr (≥ 1.4.2), pillar (≥ 1.6.4), progress (≥ 1.2.2), purrr (≥ 0.3.4), rlang (≥ 0.4.12), stringi (≥ 1.7.5), stringr (≥ 1.4.0), tibble (≥ 3.1.6), tidyr (≥ 1.1.4), vctrs (≥ 0.3.8) |
| Depends: | R (≥ 2.10) |
| NeedsCompilation: | no |
| Packaged: | 2021-11-25 15:13:02 UTC; S71458 |
| Author: | Mizuki Uchida [aut, cre] |
| Maintainer: | Mizuki Uchida <uchidamizuki@vivaldi.net> |
| Repository: | CRAN |
| Date/Publication: | 2021-11-29 08:10:05 UTC |
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.
Author(s)
Maintainer: Mizuki Uchida uchidamizuki@vivaldi.net
See Also
Useful links:
Report bugs at https://github.com/UchidaMizuki/japanstat/issues
Get meta-information of '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 filter and select.
Usage
estat(statsDataId, appId = NULL, lang = NULL, query = NULL)
Arguments
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. |
Value
A estat object.
Examples
## Not run:
estat("https://www.e-stat.go.jp/dbview?sid=0003433219")
## End(Not run)
Determine which estat object key to edit.
Description
Determine which estat object key to edit.
Usage
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)
Arguments
x |
A |
pattern |
Pattern to look for. |
new_name |
New column name. |
n |
A category number. |
Value
The estat object which the selected key is active.
Examples
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
Description
Population of the 2020 census
Usage
estat_census_2020
Format
An object of class estat of length 6.
Source
https://www.e-stat.go.jp/dbview?sid=0003433219
Download 'e-Stat' data
Description
Download 'e-Stat' data
Usage
estat_download(x, value_name = "value", query = NULL)
Arguments
x |
A |
value_name |
A column name of the value. |
query |
A list of additional queries. |
Value
A tbl of the downloaded data.
Examples
## Not run:
estat_download(estat_census_2020)
## End(Not run)
Set attributes of 'e-Stat' API
Description
Set attributes of 'e-Stat' API
Usage
estat_set(i, value)
Arguments
i |
An attribute name. |
value |
An attribute value |
Value
No output..
Examples
estat_set("estat_limit_downloads", 1e5)
estat_set("estat_limit_items", 1e2)
Set 'appId' of 'e-Stat' API
Description
Set 'appId' of 'e-Stat' API
Usage
estat_set_apikey(appId)
Arguments
appId |
An 'appId' of 'e-Stat' API. |
Value
No output.
Examples
estat_set_apikey("Your e-Stat appId")
Set language of 'e-Stat' API
Description
Set language of 'e-Stat' API
Usage
estat_set_lang(lang)
Arguments
lang |
A language of 'e-Stat' API, Japanese ( |
Value
No output.
Examples
estat_set_lang("J")
Get table information for 'e-Stat' data
Description
Get table information for 'e-Stat' data
Usage
estat_table_info(x)
Arguments
x |
A |
Value
A tbl of the table information.
Objects exported from other packages
Description
These objects are imported from other packages. Follow the links below to see their documentation.