To make sure the input dataset contains all three necessary variables: a unique identifier for the person or user a unique identifier for the spatial locaiton for the data point and a timestamp that relects the time the data point was created

validate_dataset(
  df,
  user = "u_id",
  timestamp = "created_at",
  location = "loc_id",
  keep_other_vars = F
)

Arguments

df

A dataframe with columns for the user id, location, timestamp

user

Name of column that holds unique identifier for each user

timestamp

Name of column that holds specific timestamp for each data point and it should be POSIXct

location

Name of column that holds unique identifier for each location

keep_other_vars

Option to keep or remove other variables of the input dataset