Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Database download #44

Closed
boshek opened this issue Oct 19, 2017 · 2 comments
Closed

Database download #44

boshek opened this issue Oct 19, 2017 · 2 comments

Comments

@boshek
Copy link
Collaborator

boshek commented Oct 19, 2017

From the review:

One issue I encountered was the database download, with personal handling of the database path, is awkward. It seems that much of the work of downloading the database, and then storing the path could be automated. The storage location could be supported by the rappdirs package. There are existing examples of such file downloading and use, such as getlandsat, hydrolinks, and LAGOS to name a few with various implementations. This would make it easier for users to quickly get started using the data and eliminate the need to muck around in the Renviron file.

Other review:

The example:
file.edit("~/.Renviron")
That path does not automatically work for Windows users I think. You might want to clarify that you will probably want a .Renviron file in the same directory as your RStudio project (assuming you use RStudio)...or something like that

@boshek
Copy link
Collaborator Author

boshek commented Oct 20, 2017

The approach I think here is to use rappdirs and then have here:

https://github.com/bcgov/tidyhydat/blob/dea7c3e3be4755437be93fbc33cb6dc992d17efe/R/download.R#L448-L452

download_hydat() out to the result of rappdirs::user_log_dir(). Then rather than call Sys.getenv("hydat_path") for hydat_path=NULL then we use rappdirs::user_log_dir().

@boshek
Copy link
Collaborator Author

boshek commented Oct 20, 2017

Also another "are you sure" question when downloading hydat.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant