devtools::install_github("Kolpashnikova/package_R_path")
library(path)
Visualizes paths from and into an activity in a chord diagram.The sizes of the objects are relative to the survey weights.
path(df, act, w = NULL)
df a json data.Each row represents an observation. Each column represents the diary activity at t=1 (4am) to t=1440 (3:59am), but the number of steps depends diary's granularity.
act a json object with the codes of activities
w a json array of survey weights for each observation. Default is NULL, which returns all nodes of the same size.
You can try the interactive demo here: (https://kolpashnikova.github.io/path)
Kolpashnikova, Kamila. (2022). Diary Paths Visualization for Time-Use Data in R. Toronto,ON: York University.