This is a code package for implementing MTurk with external website.
Firstly, we need to install boto3 (i.e., Python SDK for AWS) and other dependencies for processing data by:
$ pip install -r requirement.txt
or
$ pip install pandas
$ pip install boto3
Main configuration can be set in 'config.json' file. Here is some notes on configuration setting:
- To set 'aws_access_key_id' and 'aws_secret_access_key', an AWS account with credentials can be signed up here.
- Worker qualification requirement details can be found at here.
- We support to save file as '.json' or '.csv' type.
Core MTurk functions are within MTurkManager class in 'mturk_cores.py' file. This will be used in the HIT processing later.
For generating worker interfaces of HITS, please run:
python frontend_cores.py
The generated htmls (or xmls) pages are saved in 'fontend' folder.
To create HITs, please run:
python main_create_hit.py
To handle HITs results, we can retrieve, approve and save results into 'json' or 'csv' files by running:
python main_retrieve_hit.py
Note that we might need to change detailed settings of Worker Interface, Create HITs, Retrieve and Save HITs in the corresponding files (e.g., main_retrieve_hit.py), please look into the file for instruction.