Thursday, September 10, 2009

AWC files

According to the "Actical Instruction Manual", the AWC file is defined as:

This is an ASCII text file that contains the raw activity data as well as containing subject information. It can be loaded from the File menu in the Main, Actogram, and Energy Expenditure windows.

Line 1: Subject's Identity (String, e.g. Abbass)
Line 2: Start Date (DAY-MONTH-YEAR, e.g. 24-Jul-2009)
Line 3 : Start Time (HH:MM, e.g. 14:25)
Line 4 : Epoch Rate (1 =15s, 2=30s, 4=1min)
Line 5 : Age (Integer, e.g., 27)
Line 6 : Device Serial Number (String, e.g. B107496)
Line 7 : Gender (Character, e.g. M)
Line 8 : Height in cm's (Float, e.g. 179.5)
Line 9 : Weight in Kg's (Float, e.g. 72)
Line 10 : ignore - only for technical support use
Line 11 : Battery life remaining in days (e.g. 0012)


In regards to the data after the header it can appear in 2 formats:

Step Data : (Activity Counts) , (Steps)(Marker) e.g., (834) , (31.0M)
Non-Step Data : (Activity Counts)(Marker) e.g. (834M)

Tuesday, September 8, 2009

Spike Graph

In order to create a similar graph to the "spike" state of art graph (using R) in Juergen's paper, I had to do the following things.

I had to read the first three chapters of a book titled "R Graphics" by Paul Murrell. This book is a bible for those who are interested in creating "creative" graphics using R.

After that, I started recreating the graph. It was not an easy task to figure out how to make more than 5 plots to be in one column. the default "mfraw"/ "mfcol" would never do the job if you have more than 5 plots. You have to go deep in R graphics and play with parameters related to margins/figures/ plots.

I used the data collected by the first actigraph from bill's old data. the following is a snapshot of what i have done so far. notice that the dates on the right side are static labels. I still did not figure our how to display dates on R plots: