gfwr icon indicating copy to clipboard operation
gfwr copied to clipboard

explore using start_date, end_date in get_raster again

Open natemiller opened this issue 2 years ago • 0 comments

currently get_raster uses a single date_range parameter. This could be replaced by two parameters (start_date, end_date) which could be concatenated together within the function. This requires passing these two parameters into the function in the ... , pasting them together separated by a comma, and then removing them from the ... list. The code below could do the removal

dataset <- api_datasets[[dataset_type]]

date_range <- paste0(args['start_date'],',',args['end_date'])
args <- c(`datasets[0]` = dataset, date_range, args)
args <- args[!names(args) %in% c("start_date",'end_date')]

natemiller avatar May 26 '22 22:05 natemiller