| boj_metadata | R Documentation |
Downloads the complete metadata table for one BOJ database. Metadata
includes both hierarchy headings (blank series_code) and actual series.
By default it is cached for 24 hours, matching the API's daily metadata
update cycle and reducing load on the BOJ service.
boj_metadata(
db,
lang = boj_default("lang", "en"),
cache = TRUE,
refresh = FALSE,
max_age = 24 * 60 * 60,
cache_dir = boj_default("cache_dir", tools::R_user_dir("bojapi", "cache")),
include_groups = TRUE,
timeout = boj_default("timeout", 30),
retries = boj_default("retries", 3),
wait = boj_default("wait", 1)
)
db |
BOJ database identifier, such as |
lang |
Response language, |
cache |
Whether to read and write the on-disk metadata cache. |
refresh |
If |
max_age |
Maximum cache age in seconds; default 86,400 (24 hours). |
cache_dir |
Metadata cache directory. |
include_groups |
Include hierarchy-heading rows whose |
timeout |
Request timeout in seconds. |
retries |
Number of retries for network and transient server errors. |
wait |
Requested seconds between automatic requests. The default is one second, and values below one are treated as one whenever another request is needed, to avoid high-frequency access prohibited by the BOJ. |
A tibble with normalized metadata. start_time and end_time
preserve exact BOJ period codes. Parsed date columns indicate the first day
of each period and are NA for hierarchy headings.
## Not run:
metadata <- boj_metadata("FM08", lang = "jp")
subset(metadata, is_series)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.