README.md

Mobility

Mobility provides functions and methods to study location data. Please report bugs or suggestions at: https://github.com/nyu-mhealth/Mobility/issues

Install

To install the latest version from Github:

if (packageVersion("devtools") < 1.6) {
  install.packages("devtools")
}
devtools::install_github("nyu-mhealth/Mobility")

Functions

Mobility is created to provide easy and fast methods of dealing with spatial location data, especially continuous mobility data. Research methods are based on literature (see the following section). The package currently has the following functions (selected):

Methods

Radius of Gyration

In physics, Radius of gyration measures the distribution of components in an object around an axis. It's been applied in urban science in recent years to study travel behaviors of human and animals. Here, radius of gyration (rg) was used to estimate the distance participants traveled in a certain time period[1]. rg is defined by the standard deviation between locations and their center of mass.

Stayevents

With continuous mobility or trip data, it is important to identify stays to link to built-in environment and social behaviors. The algorithm for identifying stay events involves 2 steps[2][3]. First, distance between two sequential points Pn and Pn+1 is calculated and compared to a preset threshold. If the distance is smaller than the threshold, both points are put in a stay event candidate set. Then the distance between Pn+1 and Pn+2 is calculated to identify more points in the candidate set. Second, when the distance becomes larger than the threshold, the time difference between the first point in the candidate set, Pn, and the last point, Pn+m, is calculated. If the time difference is larger than a time threhold, the centroid of all the points in candidate set is taken as the stay event's location. During the process, if the distance and time exceeds thresholds, points in candidate set are reset.

More functions will be added as we expand our methods.

======

Reference:

[1] González MC, Hidalgo CA, Barabási AL. 2008. Understanding individual human mobility patterns. Nature 453:779-782.

[2] Zheng, Yu, et al. 2009. Mining interesting locations and travel sequences from GPS trajectories. Proceedings of the 18th international conference on World wide web. ACM

[3] Toole JL, Colakb S, Sturt B. 2015. The path most traveled: Travel demand estimation using big data resources. Transportation Research Part C: Emerging Technologies Pages 162-177



nyu-mhealth/Mobility documentation built on Feb. 24, 2020, 10:37 p.m.