Mirror an external data source using bowerbird's bb_rget utility
Source:R/rget.R
bb_handler_rget.Rd
This is a general handler function that is suitable for a range of data sets. This function is not intended to be called directly, but rather is specified as a method
option in bb_source
.
Arguments
- ...
: parameters passed to
bb_rget
Details
This handler function makes calls to the bb_rget
function. Arguments provided to bb_handler_rget
are passed through to bb_rget
.
Examples
my_source <- bb_source(
name = "Australian Election 2016 House of Representatives data",
id = "aus-election-house-2016",
description = "House of Representatives results from the 2016 Australian election.",
doc_url = "http://results.aec.gov.au/",
citation = "Copyright Commonwealth of Australia 2017. As far as practicable, material for
which the copyright is owned by a third party will be clearly labelled. The
AEC has made all reasonable efforts to ensure that this material has been
reproduced on this website with the full consent of the copyright owners.",
source_url = "http://results.aec.gov.au/20499/Website/HouseDownloadsMenu-20499-Csv.htm",
license = "CC-BY",
method = list("bb_handler_rget", level = 1, accept_download = "csv$"),
collection_size = 0.01)
my_data_dir <- tempdir()
cf <- bb_config(my_data_dir)
cf <- bb_add(cf, my_source)
if (FALSE) { # \dontrun{
bb_sync(cf, verbose = TRUE)
} # }