Activity Sampling System File Format

The first implementation of the iPAQ Activity Sampling System will use the file format specified below. This file format was designed for simplicity and to support a subset of the features described in the Activity Sampling System Design (ASSD) document. The supported features are enumerated below, for more detail on what each entails see the ASSD document.

1  Supported Features

1.1  Global Features

·  Title

·  Data Repository Name

·  Journaling

·  Default Question (persistent question)

·  Question Aggregation

·  Maximum Chaining Distance

·  User Day Start and Stop Times

·  Suppress Recharge Reminders

·  Allow User Silence

·  Interpret Silence as Ignore

·  Question Timeout

1.2 Question Specific Features

·  Unique ID Number

·  Multiple Choice and Multiple Response Questions (checkbox questions)

·  Default Activated State

·  Question Day Start and Stop Times

·  Manual Specification of Query Times

·  Recurrence Patterns (minutes, hours, days, weeks)

·  Bounded Randomization (Min and Max time to next query

·  Probability of Not Asking

·  Ignore Button Suppression

·  Delay and Ask Ignored Questions

·  Multiple Answers

·  Response Based Activation, Deactivation, and Chaining

2  File Format

While the file format chosen to encode the questions and associated data is not the most human friendly, CSV (comma separated value) is more manageable when edited in a spreadsheet program like Excel. To facilitate this, basic Excel and CSV question data files have been created.

This section will describe how to create a question data file (QDF) in Excel that will implement the activity-sampling algorithm you have in mind. Section 2.1 discusses the usage of the global fields; section 2.2 describes the meaning of the question specific fields; and section 2.3 discusses the process of creating a QDF from scratch.

2.1  Global Fields

2.1.1  Title

datatype = string

This is the title of the question set. It may be displayed to the user.

2.1.2  Repository

datatype = string

This is the directory into which the system will store all data regardless of its source. The string should contain no spaces slashes or other illegal directory name characters.

2.1.3  Journaling

datatype = yes/no (boolean)

This field enables (“yes”) and disables (“no”) the journaling option. When enabled the User will be able to record audio data by pressing the record button and speaking into the iPAQ. This data is then time-stamped and stored in the appropriate repository sub-directory.

2.1.4  Default

datatype = question id (integer)

This field indicates the question that should be the system default. When the user turns on the iPAQ and no other questions are scheduled to appear, this question is presented to the user. If other questions are scheduled at that time this question will be presented once the user has completed the others. This question is never shown when the device must get the user’s attention to ask a question, unless it is to ask this question.

If the default question also is scheduled by the designer then it will still be presented to the user at the specified times.

2.1.5  Aggregation

datatype = hours and minutes (hh:mm)

For example: one hour “01:00”, one hour and 10 minutes “01:10”, 10 minutes “00:10”.

When the device prompts the user with a question it will also ask any questions that are scheduled to be asked in the next X amount of time as specified by the aggregation field. Additionally, if the user turns on the device it will also aggregate and ask near future questions at that time. This feature is to prevent the device from bothering users every 2 minutes, for example, with a question.

2.1.6  Max Chain

datatype = integer

This field specifies the max number of questions that may be presented to the user consecutively as a result of chaining.

2.1.7  Day Start

datatype = 24 hour clock (hh:mm)

This field specifies the time that the user should first interact with the device during the day; i.e. when the wake up. After the Day Stop time and before this time all questions will be suppressed.

2.1.8  Day Stop

datatype = 24 hour clock (hh:mm)

This field specifies the last time the user should interact with the device during the day; i.e. when they go to bed. After this time and before the Day Start time all questions will be suppressed. If the device is not placed on the charger at this time it will continuously try to get the users attention to be recharged.

2.1.9  Recharge

datatype = yes/no (boolean)

This field determines whether the system will demand the user recharge it at the end of the day (“yes”) or not (“no”).

2.1.10 Silence

datatype = yes/no (boolean)

This field determines whether the user will have the ability to silence all system questions and alerts for a period of time. This could be useful if the user was going to an important meeting or a movie.

2.1.11 Silence Ignore

datatype = yes/no (boolean)

This field determines if a questions that is scheduled to be asked while the user has the system silenced should be considered to be ignored by the user (“yes”) or act normally, but silently (“no”).

2.1.12 TimeOut

datatype = hours and minutes (hh:mm)

For example: one hour “01:00”, one hour and 10 minutes “01:10”, 10 minutes “00:10”.

This field determines how long the system will try to get the user’s attention before assuming the user ignored the question. If this field is left blank the system will never timeout messages.

2.2  Question Specific Fields

2.2.1  ID

datatype = 0 < integer < [system specific value]

This field is unique and will be used to identify the question.

It is strong encouraged that the user number questions in counting order starting with 1.

2.2.2  Type

datatype = check_box / multiple_choice

This field specifies what type of question it is check box/multi-answer (“check_box”) or multiple choice (“multiple_choice”).

2.2.3  Active

datatype = yes/no (boolean)

This field specifies if the question should be active (“yes”) or inactive (“no”) by default.

2.2.4  Start

datatype = 24 hour clock (hh:mm)

This field specifies the time of day when the question will become active. Before this time the question will not be presented to the user.

2.2.5  Stop

datatype = 24 hour clock (hh:mm)

This field specifies the time of day when the question will become inactive. This will prevent the question from querying the user until the start time (see Section 2.2.4).

2.2.6  Times

datatype = weeks, days, hours, and minutes (ww:dd:hh:mm)

For example, one week, four days, thirty hours, and fifteen minutes from system start time translates to: “01:04:30:15”.

This field specifies specific times at which the question should be asked of the user. If the question is active at that time it will be asked of the user. To indicate multiple times, simply leave a space (dashes and semicolons are also acceptable, but do NOT use commas) between them in the same cell: “01:04:30:15 02:04:30:15”.

2.2.7  Recurrence

datatype = weeks, days, hours, and minutes (ww:dd:hh:mm)

This field specifies a recurrence pattern for the question. For example, if the question should be asked every 45 minutes enter “0:0:0:45”. By adding another layer more complicated patterns can be created. For example, if the question should be asked every 15 minutes every other hour enter “0:0:2:15”. This works the same way for weeks and days. If this field is left blank then recurrence will be disabled for the question.

2.2.8  Rand Min

datatype = days, hours, and minutes (dd:hh:mm)

This field specifies the minimum time allowed before asking the question of the user again.

2.2.9  Rand Max

datatype = days, hours, and minutes (dd:hh:mm)

This field specifies the maximum amount of time allowed before asking the question of the user again.

If a question should be asked randomly then Rand Min and Rand Max should be set. The system will then randomly select (uniform distribution) a time between the Min and Max to ask the question again.

2.2.10 No Ask

datatype = 0 <= P <= 1 (Probability)

This field specifies the probability that a question will not be asked of the user. Just before querying the user the system will use this probability to determine if the question should be actually asked. This allows generation of interesting pseudo random sequences (e.g. ask the question every 45 minutes with a .5 probability).

2.2.11 Ignore

datatype = yes/no (boolean)

This field specifies if the ignore button should be suppressed (“no”) or displayed (“yes”) when the question is asked. This prevents the user from ignoring the question, but may be a source of frustration…suppress the ignore button sparingly if at all.

2.2.12 Delay

datatype = days, hours, and minutes (dd:hh:mm)

This field specifies how long the system should wait before re-asking a question after the user has ignored it. If this field is left blank the system will not delay the question, instead it will record that the question was ignored and continue as if it received a valid answer.

2.2.13 Question

datatype = string

This field contains the text of the question that should be asked of the user. This should end with a question mark “?”.

2.2.14 Answer

datatype = string

This field contains the text of one answer the user may select.

For each additional answer add four fields to the end of this line/row in the question definition file. Those new fields correspond to Sections 2.2.14 – 2.2.17, in that order, for an additional answer. A question may have as many answers as you like, but the system may limit the number it displays to the user. Additionally, if the activations, deactivations, or chain field associated with an answer are not valid, the answers will not be displayed. To be displayed a question must have at least two valid answers.

2.2.15 Activations

datatype = IDs (integers)

This field contains the ID numbers of questions that should be activated if the user selects the directly preceding answer. Multiple IDs should be separated by a space.

2.2.16 Deactivations

datatype = IDs (integers)

This field contains the ID numbers of questions that should be deactivated if the user selects the directly preceding answer. Multiple IDs should be separated by a space.

2.2.17 Chain

datatype = ID (single integer)

This field contains the ID of a question that should be chained to if the user selects the directly preceding answer. Only a single ID may be entered.

2.3  QDF Creation

Currently the recommended tool for QDF creation and editing is a spreadsheet program that supports the comma separated value (CSV) format (e.g. Excel or Gnumeric). Using the editor of your choice open the prepared QDF file (QDF.xls).

Starting at the top, all the global variables are listed as key followed by a value in rows 3-14. Change the value of each pair to your desired value (see Section 2.1). Do not modify the keys in any way; all keys are formatted in boldface. Modifying the data type column will not affect the system, however it is designed to remain as a reference.

Finally, begin adding questions. Each question will be on its own row starting with row 18. Row 16 provides the key for each column and row 17 provides the data type for the column. Do not modify the keys in any way, but you may change the data type column if you wish; it is for your own reference. Add values to each column to create a question (see Section 2.2), it is recommended you chose consecutive counting numbers or some other simple scheme for the question IDs.

It is important to note that the system will interpret all lines starting at line 17 that have a valid id number (i.e. an integer > 0) as questions and all fields in each row as part of the question definition. To add a comment, simply omit the ID for a row. Empty rows are also ignored.

When completed save the Question Data File twice. Once in the editor’s preferred format (e.g. xls) to preserve formatting, and once as a CSV file for use by the system.