Description Usage Arguments Value Examples
This function calculates the distance between two consecutive stay events using their geolocations.
1 |
df |
a data frame object. |
groupvar |
grouping object to stratify time objects. Recommend to be ID for each individual.
If |
coor |
longitude and latitude of the spatial points in the format of c("lon","lat"). |
a list of distance values. Unit is meters.
1 2 3 4 5 | data(mobility)
mobility_stay<- stayevent(mobility, coor = c("lon","lat"), time = "datetime", dist.threshold = 100,
time.threshold = 30, time.units = "mins", groupvar = "id")
mobility_stay<- aggregate(cbind(id, stayeventlon, stayeventlat)~stayeventgroup, mobility_stay, mean)
mobility_stay$dispm<- displacement(mobility_stay, coor = c("stayeventlon","stayeventlat"), groupvar = "id")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.