Creating time-activity diagrams to visualise compositional time use patterns of daily activities using R

<p>This publication includes two sets of R code. </p> <p>The first code, named ‘1_set_up_n_create_time_activity_diagram_individual_n_aggregate.R’, has two parts. Part one sets up parameters and loads and processes the data. The original data should be in a format so that the end time of the previous activity episode is equals to the start time of the following activity episode. This makes sure that vertical timelines are continuous. Part two creates a time-activity diagram showing both individual and aggregated patterns. For an example of this visualisation, please see Figure 5 in our open access paper (doi:<a href="https://doi.org/10.3390/ijerph16050897">10.3390/ijerph16050897</a>). </p> <p>The second code, named ‘2_create_time_activity_diagram_aggregate_n_differences.R’, creates a time-activity diagram showing aggregated patterns and differences between two comparison groups. For an example of this visualisation, please see Figure 4 in our open access paper (doi:<a href="https://doi.org/10.3390/ijerph16050897">10.3390/ijerph16050897</a>).</p> <p>The two codes should be run sequentially.</p>