BISdata {BISdata} | R Documentation |
Download Data from the Bank for International Settlements (BIS)
Description
Download datasets from the Bank for International Settlements (BIS) and convert to data frames.
Usage
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", ...)
Arguments
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 |
Details
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
.
Value
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 |
Author(s)
Enrico Schumann
Examples
## (Internet connection required)
datasets()
bis.data <- fetch_dataset(dest.dir = tempdir(),
"WS_CBPOL_csv_col.zip")