R/update_bwb_database.R
update_bwb_database.Rd
If database/bwb/rain-ruhleben.fst exists, load a data frame from there
If database/bwb/rain-ruhleben.fst does not exist, read all files in downloads/bwb/ into a data frame and save this data frame in database/rain-ruhleben.fst as well as in database/rain-ruhleben.csv
Determine the days for which files are available in downloads/bwb/
Determine the days for which files need to be downloaded and provide the corresponding URLs
Download the files from the URLs determined in 4) into downloads/bwb/
Read the downloaded files into a data frame
Row-bind the data frame read in 6) with the data frame loaded in 1) or read in 2)
Save the data frame resulting from 7) in database/rain-ruhleben.fst as well as in database/rain-ruhleben.csv
update_bwb_database(root = get_root(), start_day = "2019-06-15", dbg = TRUE)
root | path to "root" folder below which to find subfolders "downloads" and "database" |
---|---|
start_day | first day of rain data to be downloaded in case that there are no downloaded files yet. Otherwise the first day is the earliest day for which data is found in the "downloads/bwb". Default: "2019-06-15" |
dbg | if |