Skip to content

Problems reading some study information with long in the future timestamps

The movebank api return some far in the future dates with 5 digits years. It concerns these studies, @sarahcd would it be an option to fix this on the movebank side?

devtools::load_all("~/move2")
#> ℹ Loading move2
aa<-movebank_retrieve(entity_type = "study")
#> Warning: `vroom` finds reading problems with the movebank specification.
#> ℹ This might relate to the returned data not fitting the expectation of the movebank data format specified in the package.
#> ℹ For retrieving the specific problem you can enable `global_entrace` using `rlang::global_entrace()` then run the command and use `rlang::last_warnings()[[1]]$problems` to retrieve the problems.
#> ℹ Alternatively in some cases you might be able to retrieve the problems calling `vroom::problems()` on the result of the function call that produced the warning.
vroom::problems(aa)
#> # A tibble: 4 × 5
#>     row   col expected        actual                   file 
#>   <int> <int> <chr>           <chr>                    <chr>
#> 1   228    29 date in ISO8601 20121-12-02 21:00:00.000 ""   
#> 2   411    29 date in ISO8601 20121-12-02 21:00:00.000 ""   
#> 3  2596    29 date in ISO8601 20254-11-30 23:00:11.000 ""   
#> 4  3632    29 date in ISO8601 20121-12-02 21:00:00.000 ""
aa[ vroom::problems(aa)$row-1,c(13,7,29)]
#> # A tibble: 4 × 3
#>   name                                        id timestamp_last_deployed_locat…¹
#>   <chr>                                  <int64> <dttm>                         
#> 1 GFH                                 2378364216 NA                             
#> 2 Giant Forest Hog                    2378316003 NA                             
#> 3 Barn owl Winter                     1433219445 NA                             
#> 4 Gian Forest Hog Movements in Uganda 2341438148 NA                             
#> # … with abbreviated variable name ¹​timestamp_last_deployed_location

Created on 2022-12-02 with reprex v2.0.2