Skip to main content

Utilities to interface with iMotions from oTree

Project description

iomotions

This project provides useful utilities for interfacing with iMotions software from third party applications.

Initial support is intended for oTree, a behavioral experiment software. Its chief goal is to enhance experiments where subjects are tracked using iMotions, making it simple to mark events surrounding page interactions.

Over time this repository may grow to provide more hooks to iMotions APIs.

Installation

To use this module add the following line to your requirements.txt file:

iomotions>=0.0.1

Then install your requirements as usual.

pip3 install -r requirements.txt

As usual it's recommended that you use a virtual environment for your dependencies.

Usage

oTree Integration API

ScenePage

ScenePage makes it simple to send start and end scene markers to oTree. Subclass this type instead of Page and the scene markers will use the class name as the scene description. When the page loads a start scene marker is sent to iMotions, and following a successful Post it will send the end scene marker, prior to progressing to the next page.

from iomotions.otree.pages import ScenePage
...

class QuizPage(ScenePage):
    pass

If you would like to provide an alternative scene identifier than the class name, simply override the scene_name property with the string you would like to use instead.

from iomotions.otree.pages import ScenePage
...

class QuizPage(ScenePage):
    scene_name = 'Question'

Note: The current round number will also be appended to the scene name to account for pages that appear in multi-round apps.

You can similarly specify a scene_description property to add the Description property to the iMotions start scene marker.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

iomotions-0.0.2.tar.gz (3.4 kB view hashes)

Uploaded Source

Built Distribution

iomotions-0.0.2-py3-none-any.whl (5.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page