ids_bulk | R Documentation |
This function downloads a data file from the World Bank International Debt Statistics (IDS), reads and processes the data into a tidy format.
ids_bulk(
file_url,
file_path = tempfile(fileext = ".xlsx"),
quiet = FALSE,
timeout = getOption("timeout", 60),
warn_size = TRUE
)
file_url |
A character string specifying the URL of the Excel file to download. This parameter is required (see ids_bulk_files). |
file_path |
An optional character string specifying the file path where
the downloaded file will be saved. Defaults to a temporary file with |
quiet |
A logical parameter indicating whether messages should be printed to the console. |
timeout |
An integer specifying the timeout in seconds for downloading the file. Defaults to the current R timeout setting. |
warn_size |
A logical parameter indicating whether to warn about large downloads. Defaults to TRUE. |
A tibble containing processed debt statistics data with the following columns:
The unique identifier for the geography (e.g., "ZMB").
The unique identifier for the series (e.g., "DT.DOD.DPPG.CD").
The unique identifier for the counterpart series.
The year corresponding to the data (as an integer).
The numeric value representing the statistic for the given geography, series, counterpart, and year.
## Not run:
available_files <- ids_bulk_files()
data <- ids_bulk(
available_files$file_url[1]
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.