Original data
[
{
"distance": 5757.0,
"changed_method": null,
"d": "190111",
"deleted": null,
"ts": 1547224631587,
"method_desc": "Car",
"duration": 312.0,
"to_loc": [
-1.790163,
55.30009
],
"from_loc": [
-1.831256,
55.34619
],
"method": 15,
The processed data
f = paste0("tai-private-data/",
"Base_Agent-1.csv")
d = readr::read_csv(f) # 22999 rows (trips)
head(d)
## # A tibble: 6 × 29
## distance changed_method d deleted ts method_desc duration
## <dbl> <chr> <int> <chr> <dbl> <chr> <dbl>
## 1 56 <NA> 151001 <NA> 1.443658e+12 Stationary 25.711
## 2 110 <NA> 151001 <NA> 1.443658e+12 Car 13.943
## 3 20 <NA> 151001 <NA> 1.443658e+12 Stationary 31.100
## 4 50 <NA> 151001 <NA> 1.443658e+12 Stationary 8.753
## 5 6 <NA> 151001 <NA> 1.443658e+12 Stationary 37.201
## 6 40 <NA> 151001 <NA> 1.443658e+12 Stationary 9.743
## # ... with 22 more variables: to_loc <chr>, from_loc <chr>, method <int>,
## # device_id <chr>, agentID <int>, from_locx <dbl>, from_locy <dbl>,
## # to_locx <dbl>, to_locy <dbl>, date <date>, dateTime <dttm>,
## # wday <int>, weekDay <chr>, decimalTime <dbl>, nextTimeStamp <dbl>,
## # calcDuration <dbl>, nextFromLocX <dbl>, nextFromLocY <dbl>,
## # locJump <int>, distGeo <dbl>, distHaversine <dbl>, speed <dbl>