For the time being, I want to create HITs manually, and retrieve them using mturk's API.
I'm using Boto to retrieve the assignments, but the problem is I can only see information filled in by the workers. I also want to see the original information that I provided for the HIT.
Case in point:
Restaurant name: Mike's Burritos (provided by me)
Restaurant address: [please enter address here] (filled in by mturk)
I can get the restaurant address with:
from boto.mturk.connection import MTurkConnection
mtc = MTurkConnection(aws_access_key_id=[ACCESS_ID],
aws_secret_access_key=[SECRET_KEY],
host=[HOST])
assignments = mtc.get_assignments([HIT_ID], status=None, sort_by='SubmitTime', sort_direction='Ascending', page_size=10, page_number=1, response_groups=None)
address = assignments[0].answers[0][0].fields
How do I get the restaurant name?
Thanks, Ed
Update
This is the relevant html I used to create the HIT:
<table>
<tbody>
<tr>
<td><label>Restaurant name:</label></td>
<td>${name}</td>
</tr>
</tbody>
</table>
^ I then upload a .csv file with 'name' as one of the properties. This populates the field above.
<div><label>Restaurant address:</label> <input class="form-control" id="address" name="address" placeholder="Enter restaurant address here" type="text" /></div>
^ MTurk fills in this for each restaurant
When I log into MTurk, view results, and click "Download csv", I'm able to get the desired result: a csv that includes both restaurant name and restaurant address.
However, the problem I am having is doing this programmatically. I have only managed to get the restaurant address... which is useless without the restaurant name to match it with.
What you're experiencing is a difference between the RUI and the API. The RUI (i.e., the website) is actually an application built on top of the MTurk API that includes additional features. When you create a CSV-upload batch in the RUI, MTurk attaches the input values to each HIT so that they're there when you download the results. MTurk doesn't actually have this feature; it's a feature of the RUI alone.
If you create the HITs via the API, you can tag them using the RequesterAnnotation
field to know which HIT is which, but there's no way to mimic the batch features of the API (that merge input and result values) without locally recording which HIT goes to which input data and then merging them after pulling assignment data from the API. Thus, if you create HITs via the RUI and later pull them from the API, there's basically no way to map inputs to results.