This function infers the most possible home locations for users with built-in recipes. The "recipe" can be either embeded "recipe" - HMLC, OSNA, APDM, FREQ, or self created "recipe".

identify_location(
  df,
  user = "u_id",
  timestamp = "created_at",
  location = "loc_id",
  tz = "Asia/Singapore",
  recipe,
  show_n_loc = 1,
  keep_score = 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 timestamp column. Should be POSIXct

location

Name of column that holds unique identifier for each location

tz

A character string containing the time zone to convert to and it should be recognized in R

recipe

Embeded algorithms to identify the most possible home locations for users

show_n_loc

Number of potential homes to extract

keep_score

Option to keep or remove calculated result/score per user per location