Description Usage Arguments Value Dataframe Requirements See Also Examples
Predict which cluster is an individual's home.
1 2 3 4 5 6 7 8 |
df1 |
A dataframe of GPS coordinates as described below. |
df2 |
A dataframe with named clusters (most likely the dataframe that is returned after running reduce_multi OR the places dataframe that is returned after running get_clusters). |
home.start |
A character vector HH:MM:SS which represents the start time that most individuals will be asleep by. |
home.end |
A character vector HH:MM:SS which represent the start time that most individual may start to wake up by. |
filt |
A logical T or F if the GPS data should be filtered between home.start and home.end. The default is T. |
max.distance |
An integer in meters. It is the maximum distance in meters a cluster can be from the home location to be labelled as "home". The defaults is 150 m. |
Returns a list of dataframes. COUNT is a dataframe that count how many times an individual was at a clusters HOME is a dataframe with clusters labelled as "Home", "Other", "In Transit"
The dataframe needs to have the following named columns:
user_id = participant id
lat = latitude coordinates
lon = longitude coordinates
start_time = GPS coordinates as POSIXct. Assumes POSIXct variable has been created using UTC timezone.
tz_olson_id = local timezone (e.g., EST, America/New_York) as character vector.
get_clusters
to cluster GPS coordinates into places.
get_places
to label each cluster's place type as identified by Google Places API
1 2 3 4 5 6 | ## Assume you have run get_clusters() on the dataset "places_gps"
## Not run:
home <- get_home(places_gps, clusters[[1]], home.start = "21:30:00", home.end = "09:30:00")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.