Activity Types
All event streams in the LAMP API are catalogued by a timestamp and specific "blueprints" (schema) of what kind of data they hold. For example, a sensor event that occurred 20 minutes ago would carry that instant's timestamp, along with a link to what kind of sensor it was, and that sensor's measurement as a payload of data. The kinds of activities available are declared below, along with the blueprint you can expect their events' data to follow.
In the case of activities (active data) completed by the participant or patient, the activity declares two types of blueprints: static data, or data that relates to the overall session, and temporal slices, data that provides millisecond precision and carries information about each action the participant took. Activities that can be customized will also have settings blueprints, but these won't actually appear in the event data (and are omitted from the fields listed below).
Survey
ActivitySpec: lamp.survey
Description
Customizable surveys. Available question types currently include:
- Text: A free-entry text box
- Boolean: A choice between "True" and "False"
- List: A radio button style list where a maximum of one option can be chosen
- Multi-Select: A checkbox style list where multiple options can be chosen
- Slider: A draggable slider to select one option from a numerical range
- Short Answer: A smaller, free entry text box
- Rating: A question which asks the participant to rate something on a numerical scale
- Time: A interactive dropdown which allows the user to select a time. Choose between AM/PM and military options
Settings
name
: A string title to display to the usersettings
: An array of objects, one for each questiontext
: A string to display to the usertype
: The question type. One oftext
,boolean
,list
,multiselect
,slider
,short
,rating
,time
required
: True or False. Whether the question must be completed to advance.- List
options
: An array of strings each corresponding to one option
- Multi-Select
options
: An array of strings each corresponding to one option
- Slider
options
: An array of numbers each corresponding to one option
- Rating
options
: An array of numbers each corresponding to one option
- Time
options
: An object with one key-value pair:timepattern
: One ofstandard
orampm
corresponding to the time selection method
Example
{'category': ['assess'],
'id': '5ha5qf49shjzmasrcrah',
'name': 'Rating Test',
'schedule': [],
'settings': [{'required': True, 'text': 'Text Question', 'type': 'text'},
{'required': True, 'text': 'Boolean', 'type': 'boolean'},
{'options': ['Option 1', 'Option 2'],
'required': True,
'text': 'List',
'type': 'list'},
{'options': ['Option 1', 'Option 2'],
'required': True,
'text': 'Multi-Select',
'type': 'multiselect'},
{'options': [0, 1],
'required': True,
'text': 'Slider',
'type': 'slider'},
{'required': True, 'text': 'Short Answer', 'type': 'short'},
{'options': [0, 1],
'required': True,
'text': 'Rating',
'type': 'rating'},
{'options': {'timePattern': 'standard'},
'required': True,
'text': 'Time',
'type': 'time'}],
'spec': 'lamp.survey'}
Data
static_data
: Unused.temporal_slices
:item
: (string) The question text.value
: (string) The selected question option text.type
: Unused.duration
: The time taken to answer a question in the survey.level
: Unused.
Example
{'timestamp': 1634047106612,
'activity': 'e2wxcekbb0typzdtz0pb',
'static_data': {},
'temporal_slices': [{'item': 'Question 1',
'value': '1',
'type': None,
'level': None,
'duration': 2500},
{'item': 'Question 2',
'value': '1',
'type': None,
'level': None,
'duration': 1235}],
'duration': 0}
Balloon Risk
ActivitySpec: lamp.balloon_risk
Description
The Balloon Risk test is a computerized assessment of risk-taking behavior. Participants click a button to continuously blow up a balloon until they either chose to "save their points" and move on to the next balloon or the balloon "pops" after being inflated too many times.
Settings
balloon_count
: Number of balloons the participant interacts withbreakpoint_mean
: The average value the balloon will pop atbreakpoint_std
: The standard deviation of the value the balloon will pop at.
Data
static_data
:points
: The associated point value with the completed session.
temporal_slices
:item
: Pump number.value
: 0 (exploded); 1 (unexploded).type
: False (exploded); True (unexploded).duration
: Time elapsed in s since last event.level
: Balloon number.
Example
{'balloon_count': 15,
'breakpoint_mean': 64.5,
'breakpoint_std': 37,
'static_data': {'points': 55},
'temporal_slices': [{'duration': 1821,
'item': 1,
'level': 1,
'type': True,
'value': 1},
{'duration': 876, 'item': 2, 'level': 1, 'type': True, 'value': 1},
{'duration': 425, 'item': 3, 'level': 1, 'type': True, 'value': 1},
{'duration': 167, 'item': 8, 'level': 1, 'type': True, 'value': 1},
...
{'duration': 128, 'item': 38, 'level': 1, 'type': True, 'value': 1},
{'duration': 145, 'item': 39, 'level': 1, 'type': True, 'value': 1},
{'duration': 135, 'item': 40, 'level': 1, 'type': True, 'value': 1},
{'duration': 154, 'item': 41, 'level': 1, 'type': True, 'value': 1},
{'duration': 1724, 'item': 1, 'level': 2, 'type': True, 'value': 1},
{'duration': 160, 'item': 2, 'level': 2, 'type': True, 'value': 1},
{'duration': 158, 'item': 3, 'level': 2, 'type': True, 'value': 1},
{'duration': 306, 'item': 4, 'level': 2, 'type': True, 'value': 1},
...
{'duration': 176, 'item': 73, 'level': 2, 'type': True, 'value': 1},
{'duration': 151, 'item': 74, 'level': 2, 'type': True, 'value': 1},
{'duration': 178, 'item': 75, 'level': 2, 'type': True, 'value': 1},
{'duration': 161, 'item': 76, 'level': 2, 'type': False, 'value': 0},
{'duration': 5602, 'item': 1, 'level': 3, 'type': True, 'value': 1},
{'duration': 2588, 'item': 1, 'level': 4, 'type': True, 'value': 1},
...
{'duration': 809, 'item': 1, 'level': 15, 'type': True, 'value': 1}],
'timestamp': 1642779164213,
'duration': 78365,
'activity': '8vw829aemgdxy8f1fvk9'}
Cats & Dogs
ActivitySpec: lamp.cats_and_dogs
& lamp.cats_and_dogs_new
Description
The Cats and Dogs game. Participants are shown a field of 10 boxes arranged in a fixed random pattern (does not change from test to test), which raise to reveal either an image of a cat, an image of a dog, or neither in a random pattern. Over the course of three levels and 45 trials, participants are told to:
- Click on all dogs (only dogs and blanks are shown)
- Click on all dogs (dogs, cats, and blanks are shown)
- Click on all cats (dogs, cats, and blanks are shown)
Settings
Currently no settings are available for this activity.
Data
static_data
:point
: The associated point value with the completed session. 2 if all 45 trials were answered perfectly, else 1.correct_answers
: The total number of correct answers made in the session.wrong_answers
: The total number of incorrect answers made in the session.total_questions
: The total number of trials given to the participant. Currently always 45.
temporal_slices
:item
: 1-10 depending on the box chosenvalue
: Unused.type
: True if the tap was correct, false otherwiseduration
: Time elapsed since the last tap or trial startlevel
: 1-3 corresponding to the numbered levels above
Example
{'duration': 445841,
'static_data': {'StartTime': None,
'correct_answers': 22,
'point': 1,
'score': 49,
'type': 1,
'wrong_answers': 1},
'temporal_slices': [{'duration': 5243,
'item': 9,
'level': 1,
'type': True,
'value': None},
{'duration': 2611, 'item': 5, 'level': 1, 'type': True, 'value': None},
{'duration': 1125, 'item': 8, 'level': 1, 'type': True, 'value': None},
{'duration': 2688, 'item': 2, 'level': 1, 'type': True, 'value': None},
{'duration': 946, 'item': 3, 'level': 1, 'type': True, 'value': None},
{'duration': 1000, 'item': 4, 'level': 1, 'type': True, 'value': None},
{'duration': 4568, 'item': 4, 'level': 1, 'type': True, 'value': None},
{'duration': 1035, 'item': 6, 'level': 1, 'type': True, 'value': None},
{'duration': 843, 'item': 3, 'level': 1, 'type': True, 'value': None},
{'duration': 798, 'item': 2, 'level': 1, 'type': True, 'value': None},
{'duration': 4298, 'item': 1, 'level': 1, 'type': True, 'value': None},
{'duration': 854, 'item': 8, 'level': 1, 'type': True, 'value': None},
{'duration': 1397, 'item': 5, 'level': 1, 'type': True, 'value': None},
{'duration': 885, 'item': 9, 'level': 1, 'type': True, 'value': None},
{'duration': 4338, 'item': 10, 'level': 1, 'type': True, 'value': None},
{'duration': 624, 'item': 9, 'level': 1, 'type': True, 'value': None},
{'duration': 2846, 'item': 3, 'level': 1, 'type': True, 'value': None},
{'duration': 2002, 'item': 8, 'level': 2, 'type': False, 'value': None},
{'duration': 1981, 'item': 5, 'level': 2, 'type': True, 'value': None},
{'duration': 731, 'item': 3, 'level': 2, 'type': True, 'value': None},
{'duration': 4555, 'item': 4, 'level': 2, 'type': True, 'value': None},
{'duration': 1608, 'item': 3, 'level': 2, 'type': True, 'value': None},
{'duration': 910, 'item': 5, 'level': 2, 'type': True, 'value': None}],
'timestamp': 1649447701749,
'activity': 'sjfvrd7jpjyjzbkgwex4'}
Emotion Recognition
ActivitySpec: lamp.emotion_recognition
Description
The Emotion Recognition task. Participants are presented with a random subset of up to 10 images and must identify the emotion expressed in each one (e.g. "Happiness", "Sadness", "Neutral", "Fear", "Anger").
Settings
NA.