get_places() analyzes periods of stationary activity within a cluster and transforms the coordinates into a single location or 'place'. The input data frame may include spatiotemporal cluster groupings generated by the circleclust() function or spatially joined clusters (i.e. merge_clusters()). get_places() also summarizes the duration of time (hours) spent as well as the first and last timestamp recorded at each location.

get_places(
  df,
  cluster_col = "sp_temporal_cluster",
  nested = TRUE,
  geometry = TRUE,
  summary = FALSE,
  dt_field = NULL
)

Arguments

df

a data frame with spatiotemporal or merged cluster groupings.

cluster_col

character; name of column indicating cluster group (sp_temporal_cluster or spatial_cluster)

nested

logical; if TRUE, metadata for each cluster is nested in a list column (p_data)

geometry

logical; if TRUE, an sf tibble with a corresponding geometry column is returned

summary

logical; if TRUE, the returned data frame is appended with summary values for duration, start time, and end time for stationary activity recorded for each cluster

dt_field

character; name of datetime field used to calculate summary information

Value

a data frame or sf object

Examples

if (FALSE) {

get_places(df, cluster_col = NULL, nested = TRUE, geometry = TRUE, summary = TRUE, dt_field = NULL)
}