Download resources from BPS API, such as spreadsheet datasets, publications, press releases or infographics.
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.
See also
bps_view()
to get information such as the download URL of a resource.bps_search()
to find resources and their download URLs.bps_dataset_spreadsheet()
to look up spreadsheet datasets and their download URLs.
Examples
# Download an infographic
infographics <- bps_search("infographic")
if (FALSE) {
bps_download(infographics$file_url[[1]], "infographics.png")
}