BISdata | R Documentation |
Download datasets from the Bank for International Settlements (BIS) and convert to data frames.
fetch_dataset(dest.dir, dataset,
bis.url = "https://data.bis.org/static/bulk/",
exdir = tempdir(),
return.class = NULL,
frequency = NULL,
...,
header = TRUE,
sep = ",",
stringsAsFactors = FALSE,
check.names = FALSE,
na.strings = "",
quote = "\"",
fill = TRUE)
datasets(url = "https://data.bis.org/bulkdownload", ...)
dest.dir |
file path: where to store the files? |
dataset |
the name of the file |
bis.url |
the base url |
url |
the url from which to fetch information about the datasets |
exdir |
file path: where to unzip? |
return.class |
|
frequency |
string, or nothing ( |
... |
passed on to |
header , sep , stringsAsFactors , check.names , na.strings , quote , fill |
passed on to |
Supported are full datasets (typically) in CSV format. Downloaded data may optionally be cached, to avoid repeated downloads of the same files.
If the download fails with an error, then both
functions will return NULL
. For
fetch_dataset
, if the download failed with
a warning from download.file
, then
the function will evaluate to the return value of
download.file
.
typically a data.frame
.
bis_datasets
returns a data.frame
with three columns:
filename |
the dataset filename |
description |
a brief description of the dataset |
updated |
if available, the date when the dataset was last updated |
Enrico Schumann
## (Internet connection required)
datasets()
bis.data <- fetch_dataset(dest.dir = tempdir(),
"WS_CBPOL_csv_col.zip")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.