Skip to content

Commit

Permalink
change zenodo record ID and update timeout download option, closes #29
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben Weinstein authored and Ben Weinstein committed May 18, 2021
1 parent cca1397 commit 16fea99
Show file tree
Hide file tree
Showing 12 changed files with 48 additions and 23 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Description: A benchmark dataset and evaluation routine for individual tree crow
License: MIT
Encoding: UTF-8
LazyData: true
RoxygenNote: 6.0.1
RoxygenNote: 7.1.1
Suggests: knitr,
rmarkdown,
testthat
Expand Down
9 changes: 7 additions & 2 deletions R/download.R
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@
#' @export
download<-function(training=FALSE,savedir=NULL,force=F){

#Store users timeout options
timeout_option_backup <- getOption("timeout")
options(timeout = max(3600, getOption("timeout")))

if(is.null(savedir)){
destination<-paste(system.file(package = "NeonTreeEvaluation"),"/extdata/NeonTreeEvaluation.zip",sep="")
dirname <-paste(system.file(package = "NeonTreeEvaluation"),"/extdata/NeonTreeEvaluation/",sep="")
Expand All @@ -37,18 +41,19 @@ download<-function(training=FALSE,savedir=NULL,force=F){
}

#Evaluation data
eval_url<-zenodo_url(concept_rec_id=3723356)
eval_url<-zenodo_url(concept_rec_id=4770593)
message(paste("Downloading file to",destination))
download.file(eval_url,destination, mode = "wb")
unzip_download(destination)

#Optional Training Data
if(training){
url<-zenodo_url(concept_rec_id=3459802)
url<-zenodo_url(concept_rec_id=4746605)
destination<-paste(system.file(package = "NeonTreeEvaluation"),"/extdata/",sep="")
download.file(eval_url,destination, mode = "wb")
unzip_download(destination)
}
options(timeout = timeout_option_backup)
}

unzip_download <- function(destination){
Expand Down
8 changes: 6 additions & 2 deletions man/compute_precision_recall.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion man/crown_polygons.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 8 additions & 2 deletions man/evaluate_field_crowns.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 7 additions & 3 deletions man/evaluate_image_crowns.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion man/field.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion man/get_data.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 0 additions & 7 deletions man/image_crowns.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions man/site_summary.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion man/submission.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions man/zenodo_url.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 16fea99

Please sign in to comment.