nilanjanchatterjee / move_summary

Summary of the movement dataset downloaded from movebank
MIT License
0 stars 2 forks source link

assumes pressence of timestamp column #1

Closed bart1 closed 1 year ago

bart1 commented 1 year ago

I noticed the code failing in the app. This most likely relates to the assumption there is a column named timestamps which is not always the case, better refer to retrieving the timestamps with the move::timestamps function:

data<-move::getDataRepositoryData("doi:10.5441/001/1.2tp2j43g")
#> https://www.datarepository.movebank.org/handle/10255/move.328
#> https://www.datarepository.movebank.org/handle/10255/move.329
#> https://www.datarepository.movebank.org/handle/10255/move.330
data$timestamp
#> NULL
move::timestamps(data)
#>     [1] "2011-02-11 18:06:14 UTC" "2011-02-11 18:10:09 UTC"
#>     [3] "2011-02-11 18:20:59 UTC" "2011-02-11 18:41:31 UTC"
#>     [5] "2011-02-11 19:41:11 UTC" "2011-02-11 19:50:58 UTC"
......
#> [32897] "2011-05-28 08:56:22 UTC" "2011-05-28 08:59:46 UTC"
#> [32899] "2011-05-28 09:00:22 UTC" "2011-05-28 09:02:07 UTC"
#> [32901] "2011-05-28 09:04:38 UTC" "2011-05-28 09:06:59 UTC"
#> [32903] "2011-05-28 09:09:00 UTC" "2011-05-28 09:10:25 UTC"

Created on 2022-09-26 with reprex v2.0.2