1/1

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

software
posted on 17.03.2019 by Jinfeng Zhao, Kevin Chang, Melody Smith-nee Oliver

This publication includes two sets of R code.

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:10.3390/ijerph16050897).

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:10.3390/ijerph16050897).

The two codes should be run sequentially.

Funding

Faculty Research Development Fund Grant (grant number: 3715390), Faculty of Medical and Health Sciences, the University of Auckland.

Health Research Council of New Zealand (grant number: 14/436).

Health Research Council of New Zealand Sir Charles Hercus Research Fellowship (grant number: 17/013).

History

Publisher

University of Auckland

Licence

Exports

Logo branding

Licence

Exports