ropensci / bikedata

:bike: Extract data from public hire bicycle systems
https://docs.ropensci.org/bikedata
81 stars 16 forks source link

store_bikedata no longer downloads #65

Closed mpadge closed 6 years ago

mpadge commented 6 years ago

Data downloading must now explicitly be done via the dl_bikedata function, but many documents still suggest that store_bikedata will auto-download. This change is because there is no failsafe way to call a downloading version of store_bikedata(data_dir=d), where d contains some pre-downloaded data, yet the call is intended to download additional data. Much easier and cleaner to leave the single dl_bikedata function for downloading, with store_bikedata only loading those files in the nominated directory.

TODO: Update documentation accordingly

mpadge commented 6 years ago

A better way to express the problem: store_bikedata might want to be used to load only data held in a particular directory, or it may want to be used to add new data published since those data were downloaded. There is no easy way to distinguish these use cases (other than an additional binary update = TRUE flag, but I ain't doing that), and so better control is afforded through ensuring that store_bikedata only stores what is there, and dl_bikedata can be used to precisely manage data.