Skip to contents

Download resources from BPS API, such as spreadsheet datasets, publications, press releases or infographics.

Usage

bps_download(url, file_path)

Arguments

url

A BPS API download URL. Supply a vector of URLs to download multiple resources.

file_path

The path to save the resource. Must have a ".xls", ".pdf" or ".png" extension. Supply a vector of the same length as url to save multiple resources.

Value

A character vector of file_path.

See also

Examples

# Download an infographic
infographics <- bps_search("infographic")

if (FALSE) {
bps_download(infographics$file_url[[1]], "infographics.png")
}