bcgov-r-geo-workshop
bcgov-r-geo-workshop copied to clipboard
Fix download_hydat function from {tidyhydat}
tidyhydat is a package that uses Environment Canada's HYDAT database to extract streamflow data into R. The package has a function called download_hydat that downloads the function and stores it locally in a standard location across OS's. Sometimes however a user may want to download it to a specific place. The steps are:
- Ask user if they want to download
- Download file
- Unzip it
- Move the file where the user wants it.
The unzipping process seems fragile when one wants to download the HYDAT database to a non-standard location. More details here:
https://github.com/ropensci/tidyhydat/issues/129
Combined with #3