Skip to content

Commit

Permalink
Update datUtils.R
Browse files Browse the repository at this point in the history
  • Loading branch information
Dmitry Kisler committed Jun 10, 2018
1 parent 3273c7e commit ace7db1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion functions/datUtils.R
Expand Up @@ -7,7 +7,7 @@
datFetcher <- function() {
library(jsonlite, verbose = F, quietly = T)

dat <- tryCatch(fromJSON( gsub("\\@ts\\@", paste0(as.integer(Sys.time()), '000'), "https://shipahoy.io/api/v1/live?start_ts=@ts@&port_id=2&end_ts=@ts@") )$vessels ,
dat <- tryCatch(fromJSON( gsub("\\@ts\\@", paste0(as.integer(Sys.time()), '000'), "https://shipahoy.io/#####") )$vessels ,
error = function(c) return(data.frame())
) %>% data.frame()
return(dat)
Expand Down

0 comments on commit ace7db1

Please sign in to comment.