Skip to contents

Gets or sets the data sources contained in a bowerbird configuration object.

Usage

bb_data_sources(config)

bb_data_sources(config) <- value

Arguments

config

bb_config: a bowerbird configuration (as returned by bb_config)

value

data.frame: new data sources to set (e.g. as returned by bb_example_sources)

Value

a tibble with columns as specified by bb_source

Details

Note that an assignment along the lines of bb_data_sources(cf) <- new_sources replaces all of the sources in the configuration with the new_sources. If you wish to modify the existing sources then read them, modify as needed, and then rewrite the whole lot back into the configuration object.

Examples

## create a configuration and add data sources
cf <- bb_config(local_file_root="/your/data/directory")
cf <- bb_add(cf,bb_example_sources())

## examine the sources contained in cf
bb_data_sources(cf)
#> # A tibble: 6 × 16
#>   id               name  description doc_url source_url citation license comment
#>   <chr>            <chr> <chr>       <chr>   <list>     <chr>    <chr>   <chr>  
#> 1 oisst.v2         NOAA… "Weekly an… http:/… <chr [1]>  "NOAA_O… Please… NA     
#> 2 aus-election-ho… Aust… "House of … http:/… <chr [1]>  "Copyri… CC-BY   NA     
#> 3 SEALEVEL_GLO_PH… CMEM… "For the G… http:/… <chr [1]>  "In cas… See ht… NA     
#> 4 SeaWiFS_L3m_MO_… Ocea… "Monthly r… https:… <chr [1]>  "See ht… Please… NA     
#> 5 10.5067/IJ0T7HF… Sea … "NSIDC pro… https:… <chr [1]>  "Stroev… Please… NA     
#> 6 greatlakes-supe… Bath… "A draft v… https:… <chr [1]>  "Publis… https:… Only t…
#> # ℹ 8 more variables: method <list>, postprocess <list>,
#> #   authentication_note <chr>, user <chr>, password <chr>,
#> #   access_function <chr>, data_group <chr>, collection_size <dbl>

## replace the sources with different ones
if (FALSE) {
bb_data_sources(cf) <- new_sources
}