| Title: | Summarize Daily Physical Activity from 'SenseWear' Accelerometer Data |
|---|---|
| Description: | Provide summary table of daily physical activity and per-person/grouped heat map for accelerometer data from SenseWear Armband. See <https://templehealthcare.wordpress.com/the-sensewear-armband/> for more information about SenseWear Armband. |
| Authors: | Yukun Zhang [aut,cre], Milad Yavari [aut], Bob Haennel[aut], Haocheng Li [aut,ctb] |
| Maintainer: | Yukun Zhang <[email protected]> |
| License: | GPL-2 |
| Version: | 1.0 |
| Built: | 2026-06-06 07:35:22 UTC |
| Source: | https://github.com/cran/PASenseWear |
Demographic data for 4 random participants is provided.
data(demography)data(demography)
A data frame with 4 rows and 3 colomns
The variables are as follows:
ID The ID of the participant
Age The age of the participant
Gender The gender of the participant
Generate a heatmap to show different activity intensities (in MET) at different time of different days.
Heatmap(data, a, category = FALSE)Heatmap(data, a, category = FALSE)
data |
A csv file for one participant with multiple days' activity records from SenseWear. Data format refers to provided |
a |
The desired cutpoints of METs. Lower and upper limits must be specified. E.g. |
category |
Default is FALSE which means treating METs as continuous. |
graph A heatmap generated by ggplot with x axis Time and y axis Date
#Continuous METs Heatmap(sampledata); #Categorical METs with cutpoint 0,3,5,7 Heatmap(sampledata,c(0,3,5,7),category=TRUE)#Continuous METs Heatmap(sampledata); #Categorical METs with cutpoint 0,3,5,7 Heatmap(sampledata,c(0,3,5,7),category=TRUE)
Generate heatmap to show activity intensity (in MET) of multiple participants grouped by specified factor (age, gender, etc.).
multipleheatmap(data, demography, f, category = TRUE)multipleheatmap(data, demography, f, category = TRUE)
data |
Combined csv file from SenseWear with multiple participants, participants are distinguished by ID. Refer to sampledata_multiple.rda for sample format. |
demography |
Demographic data includes the required factor(s) (e.g. age and/or gender) of the corresponding participant. |
f |
The factor (age, gender, etc.) user wants to group data by. |
category |
TRUE or FALSE for categorical factor. Default is TRUE. |
The mean of METs of available days/groups are calculated and used in the heatmap.
Graph A heatmap generated by ggplot with x axis Time and y axis factor.
Table A table summarizes the number of records of each participant on each day.
# Continuous factor example multipleheatmap(sampledata_multiple,demography,Age,category=FALSE) # Categorical factor example multipleheatmap(sampledata_multiple,demography,Gender,category=TRUE)# Continuous factor example multipleheatmap(sampledata_multiple,demography,Age,category=FALSE) # Categorical factor example multipleheatmap(sampledata_multiple,demography,Gender,category=TRUE)
Package PASenseWear allows you to summarize SenseWear physical activity data and to plot heat map from different perspectives.
Function Sensewear_report produces participant's daily activity report.
Function heatmap plots heat map for a single participant. It shows the daily activity intensity change and makes it easy to compare activity intensity across different days.
Function multipleheatmap gives the availability of grouping participants as user defined categories. The heat map illustrates different daily activity intensities of different groups.
Sample datasets are provided for a referance of data format:
sampledata provides one participant's sample activity data.
sampledata_multiple provides 4 participants' combined sample activity data. An extra column ID helps to identify different participants.
demography records the age and gender of the above 4 participants for the use of plotting group heat map. Users can provide other demographic information for the corresponding useage in function multipleheatmap.
Five consecutive days data is provided. The variables are as follows:
Time The time of the record
Trans_accel_peaks Transverse accel-peaks
Forw_accel_peaks Forward accel-peaks
Longi_accel_peaks Longitudinal accel-peaks
skin_temp_aver Skin temp-average
GSR_aver GSR-average
Trans_accel_aver Transverse accel-average
Longi_accel_aver Longitudinal accel-average
Near_body_temp_aver Near-body temp-average
Trans_accel_MAD Transverse accel-MAD
Longi_accel_MAD Longitudinal accel-MAD
Step_counter Step Counter
Forw_accel_aver Forward accel-average
Forw_accel_MAD Forward accel-MAD
Lying_down Lying down
Sleep Sleep
Physical_Activity Physical Activity
EE Energy Expenditure
Sedentary Sedentary
Mild Mild
Moderate Moderate
Vigorous Vigorous
METs Metabolic Equivalent of Task
Speed Speed
Distance Distance
Activity_Class 9-Sleeping, 4-Resting, 7-Motoring, 1-Walking, 2-Running, 10-Elliptical Training, 3-Stationary Biking, 8-Road Biking,5-Resistance
Sleep_Class 0-Awake, 2-Light Sleep, 4-Deep Sleep, 5-Very Deep Sleep
Heat_flux_aver Heat flux - average
data(sampledata)data(sampledata)
A data frame with 6099 rows and 28 variables
Simulated SenseWear physical activity data for 4 random participants including METs and Time The variables are as follows:
Time1 The time of the recorded activity
METs The Metabolic Equivalent of Task of the recorded activity
ID The ID of the participant
data(sampledata_multiple)data(sampledata_multiple)
A data frame with 22818 rows and 3 colomns
Summarize sedentary, mild, moderate, and MVPA related activity measures.
Sensewear_report(data)Sensewear_report(data)
data |
csv file from SenseWear |
MVPA long bout is defined as at least 10 consecutive minutes with METs>=3 (allowing 2 min below that threshold).
Year The calendar year of recorded event
Month The calendar month of recorded event
Day The calendar day of recorded event
Dayofweek The day of that week
Time_on_body_Hrs Total time (hours) of SenseWear on body
Time_waking_wearing_Hrs Total waking time (hours) during wearing time
Time_on_body_percent Percent of wearing time of a day
Steps Total steps of the day
Time_lying_Hrs Total lying time (hours)
Time_sleeping_Hrs Total sleeping time (hours)
Time_sed_Hrs Total sedentary time (hours)
TEE_Kcal Total energy expenditure (Kcal)
Time_waking_Sedentary_Hrs When the wearer is waking, the total sedentary time (hours)
Percent_waking_sed When the wearer is waking, the percentage of sedentary time to wearing time
Time_waking_Mild_Hrs When the wearer is waking, the total mild time (hours)
Percent_waking_mild When the wearer is waking, the percentage of mild time to wearing time
Time_waking_Moderate_Hrs When the wearer is waking, the total moderate time (hours)
Percent_waking_moderate When the wearer is waking, the percentage of moderate time to wearing time
Time_waking_MVPA_Hrs When the wearer is waking, the total MVPA time (hours)
Percent_waking_MVPA When the wearer is waking, the percentage of MVPA time to wearing time
Time_waking_Vigorous_Hrs When the wearer is waking, the total vigorous time (hours)
Percent_waking_vigorous When the wearer is waking, the percentage of vigorous time to wearing time
No_sed_breaks Number of sedentary breaks (at least one minute interruption counting as a break)
Time_all_break_length_Hrs Summation of time (hours) of breaks
Average_EE_break_kcal Average energy expenditure of breaks
Time_below_1_METs_Hrs Total time (hours) of MET less than 1
Time_btw_1_2_METs_Hrs Total time (hours) of MET between 1 and 2
Time_btw_2_3_METs_Hrs Total time (hours) of MET between 2 and 3
Time_btw_3_4_METs_Hrs Total time (hours) of MET between 3 and 4
Time_btw_4_5_METs_Hrs Total time (hours) of MET between 4 and 5
Time_btw_5_6_METs_Hrs Total time (hours) of MET between 5 and 6
Time_above_6_METS_Hrs Total time (hours) of MET over 6
Steps_above_1.5_METs Summation of step count when energy expenditure is >1.5 METs with step counts not equal to 0
EE_steps_above_1.5METs_kcal Summation of energy expenditure for in Kcal when energy expenditure is >1.5 METs with step counts not equal to 0
Steps_above_3_METs Summation of step count when energy expenditure is >3 METs with step counts not equal to 0
EE_steps_above_3METs_kcal Summation of energy expenditure for in Kcal when energy expenditure is >3 METs with step counts not equal to 0
Time_100_steps_per_day_Hrs Summation of time (hours) for Steps>=100 per minute
PAEE_above_1.5METs_kcal Summation of energy expenditure in Kcal when energy expenditure is >1.5 METs
Time_PAEE_1.5METs_Hrs Summation of time (hours) when energy expenditure is >1.5 METs
PAEE_above_3METs_kcal Summation of energy expenditure in Kcal when energy expenditure is >3 METs
Time_PAEE_3METs_Hrs Summation of time (hours) energy expenditure is >3 METs
No_unBouted_10min Summation of number of MVPA bout which energy expenditure is >3 METs and length is less than 10 minutes
EE_unBouted_10min_Kcal Summation of energy expenditure of bout which energy expenditure is >3 METs and length is less than 10 minutes
Time_unBouted_10min_Hrs Summation of time (hours) of bout which length is less than 10 minutes
No_Bout_10min Summation of number of bout which length is more than 10 minutes
EE_Bouted_10min_Kcal Summation of energy expenditure of MVPA bout which length is more than 10 minutes
Time_Bouted_10min_Hrs Summation of time (hours) of MVPA bout which length is more than 10 minutes
No_Bout_20min Summation of number of MVPA bout which length is more than 20 minutes
EE_Bouted_20min_Kcal Summation of number of MVPA bout which length is more than 20 minutes
Time_Bouted_20min_Hrs Summation of time (hours) of MVPA bout which length is more than 20 minutes
No_Bout_30min Summation of number of MVPA bout which length is more than 30 minutes
EE_Bouted_30min_Kcal Summation of energy expenditure of MVPA bout which length is more than 30 minutes
Time_Bouted_30min_Hrs Summation of time (hours) of MVPA bout which length is more than 30 minutes
Mean_bout_duration Mean MVPA bout duration which bout length is more than 10 minutes: Time_Bouted_10min_Hrs/No_Bout_10min
No_Bouts_Extra_Long_steps The number of bouts of 'extra long' (>500 steps) walks in each day
No_Bouts_Long_steps The number of bouts of 'long' (100-499 steps) walks in each day
No_Bouts_Moderate_steps The number of bouts of 'moderate' (20-99 steps) walks in each day
No_Bouts_Short_steps The number of bouts of 'short' walks (<20 steps) in each day
Mean_cadence_extra_long Mean cadence (steps/min) in 'extra long' bouts of walking
Mean_cadence_long Mean cadence (steps/min) in 'long' bouts of walking
Mean_cadence_moderate Mean cadence (steps/min) in 'moderate' bouts of walking
Mean_cadence_short Mean cadence (steps/min) in 'short' bouts of walking
Mean_cadence_day Mean cadence (steps/min) in each day
Sensewear_report(sampledata)Sensewear_report(sampledata)